!30804 [MSLITE] Fix bug of mindir converter.
Merge pull request !30804 from wangshaocong/bugfix_r1.6
This commit is contained in:
commit
3c2ecf6a37
|
@ -469,6 +469,9 @@ AbstractBasePtr GetCNodeInputAbstract(const CNodePtr &cnode, size_t index) {
|
|||
if (utils::isa<ParameterPtr>(input)) {
|
||||
auto parameter = input->cast<ParameterPtr>();
|
||||
abstract = parameter->abstract();
|
||||
} else if (utils::isa<ValueNodePtr>(input)) {
|
||||
auto value_node = input->cast<ValueNodePtr>();
|
||||
abstract = value_node->abstract();
|
||||
} else if (utils::isa<CNodePtr>(input)) {
|
||||
auto input_cnode = input->cast<CNodePtr>();
|
||||
if (CheckPrimitiveType(input_cnode, prim::kPrimTupleGetItem)) {
|
||||
|
|
|
@ -255,8 +255,8 @@ int RemoveRedundantOpPass::RemoveDropoutOp(const AnfNodePtr &anf_node, const Fun
|
|||
}
|
||||
auto get_index = CastToInt(get_index_node->value()).front();
|
||||
if (get_index > 0 && !manager->node_users()[node].empty()) {
|
||||
MS_LOG(ERROR) << "dropout's second output is useful.";
|
||||
return lite::RET_ERROR;
|
||||
MS_LOG(DEBUG) << "dropout's second output is useful.";
|
||||
continue;
|
||||
}
|
||||
manager->Replace(node, cnode->input(1));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue