diff --git a/mindspore/lite/tools/optimizer/common/gllo_utils.cc b/mindspore/lite/tools/optimizer/common/gllo_utils.cc index 273585031fd..feb98505391 100644 --- a/mindspore/lite/tools/optimizer/common/gllo_utils.cc +++ b/mindspore/lite/tools/optimizer/common/gllo_utils.cc @@ -469,6 +469,9 @@ AbstractBasePtr GetCNodeInputAbstract(const CNodePtr &cnode, size_t index) { if (utils::isa(input)) { auto parameter = input->cast(); abstract = parameter->abstract(); + } else if (utils::isa(input)) { + auto value_node = input->cast(); + abstract = value_node->abstract(); } else if (utils::isa(input)) { auto input_cnode = input->cast(); if (CheckPrimitiveType(input_cnode, prim::kPrimTupleGetItem)) { diff --git a/mindspore/lite/tools/optimizer/graph/redundant_op_remove_pass.cc b/mindspore/lite/tools/optimizer/graph/redundant_op_remove_pass.cc index a76d9dbb116..93f294857b1 100644 --- a/mindspore/lite/tools/optimizer/graph/redundant_op_remove_pass.cc +++ b/mindspore/lite/tools/optimizer/graph/redundant_op_remove_pass.cc @@ -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)); }