From a00079a80ce3642d80aa2272d04a4557349da708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=94=80?= Date: Sat, 25 Oct 2025 15:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4dropout?= =?UTF-8?q?=E7=AE=97=E5=AD=90=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/optimizer/graph/redundant_op_remove_pass.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a753b60c..6a849f4f 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."; -- Gitee