Browse Source

!3612 modify case

Merge pull request !3612 from changzherui/mod_case
tags/v0.7.0-beta
mindspore-ci-bot Gitee 5 years ago
parent
commit
2f956d7cc2
2 changed files with 4 additions and 3 deletions
  1. +3
    -1
      mindspore/ccsrc/transform/graph_ir/convert.cc
  2. +1
    -2
      tests/ut/python/automl/test_case.py

+ 3
- 1
mindspore/ccsrc/transform/graph_ir/convert.cc View File

@@ -1342,9 +1342,11 @@ void DfGraphConvertor::SetOpInput(const OpAdapterPtr &adpt, const CNodePtr &node
}

for (size_t i = 1; i < input_size; i++) {
auto pred = inputs[i];
AnfNodePtr pred = nullptr;
if (case_flag != 0) {
pred = case_input_handle_cache_[node.get()]->at(i - 1);
} else {
pred = inputs[i];
}

while (pred->isa<CNode>() && GetCNodeTargetFuncName(pred->cast<CNodePtr>()) == "Depend") {


tests/ut/python/automl/case.py → tests/ut/python/automl/test_case.py View File

@@ -29,8 +29,7 @@ class Net(nn.Cell):

def construct(self, x, index):
x = self.layers[index](x)
y = self.conv1(x)
return x + y
return 2 + x


def test_case():

Loading…
Cancel
Save