diff --git a/lite/core/mir/elimination/remove_tf_redundant_ops_pass.cc b/lite/core/mir/elimination/remove_tf_redundant_ops_pass.cc index 673854b118a8adaca73cb905eda4892b6903665c..d21541b185d4cf578069fee495bd91b467b99a90 100644 --- a/lite/core/mir/elimination/remove_tf_redundant_ops_pass.cc +++ b/lite/core/mir/elimination/remove_tf_redundant_ops_pass.cc @@ -184,6 +184,11 @@ void RemoveTFRedundantOpsPass::RemoveSqueeze2Reshape2Pattern( } } + if (nullptr == reshape2_out_node) { + VLOG(5) << "reshape2_out_node doesn't found, skip now"; + return; + } + // find next inst node of reshape2 VLOG(5) << "reshape2_out_node->outlinks.size():" << reshape2_out_node->outlinks.size()