!3082 fix argmaxwith value error in pynative mode on GPU

Merge pull request !3082 from chujinjin/fix_argmaxwithvalue_error_in_pynative_mode
This commit is contained in:
mindspore-ci-bot 2020-07-15 18:10:12 +08:00 committed by Gitee
commit 6c334ca7ac
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ CNodePtr SessionBasic::CreateNewCNode(const CNodePtr &cnode, bool valid_input, K
cnode_inputs.emplace_back(new_value_node);
}
continue;
} else if (anf->isa<Parameter>()) {
} else if (anf->isa<Parameter>() && AnfAlgo::GetOutputTensorNum(anf) == 1) {
auto new_parameter = CreateNewParameterFromParameter(anf, valid_input, graph);
cnode_inputs.push_back(new_parameter);
if (GetGraphIdByNode(anf) == kInvalidGraphId) {