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 a753b60c662756b59951920be34cd1152c8e6c11..6a849f4f572369d6b0ca0f248fd6c01813f8d380 100644 --- a/mindspore-lite/tools/optimizer/graph/redundant_op_remove_pass.cc +++ b/mindspore-lite/tools/optimizer/graph/redundant_op_remove_pass.cc @@ -345,8 +345,8 @@ int RemoveRedundantOpPass::RemoveDropoutOp(const AnfNodePtr &anf_node, const Fun MS_LOG(ERROR) << "dropout out node is invalid."; return lite::RET_ERROR; } - MS_CHECK_TRUE_RET(node->cast() != nullptr, RET_ERROR); - MS_CHECK_TRUE_RET(node->cast()->size() > kInputSizeThree, RET_ERROR); + MS_CHECK_TRUE_MSG(node->cast() != nullptr, RET_ERROR, "node is not cnode!"); + MS_CHECK_TRUE_MSG(node->cast()->size() >= kInputSizeThree, RET_ERROR, "size of node should >= 3!"); auto get_index_node = node->cast()->input(kInputIndexTwo)->cast(); if (get_index_node == nullptr) { MS_LOG(ERROR) << "tuple get item node is invalid.";