From 1ebbfd9741f7cfdbe8eefc0147f296837dfe2bfc Mon Sep 17 00:00:00 2001 From: ysh329 Date: Thu, 20 Aug 2020 10:10:22 +0800 Subject: [PATCH] fix remove tf redundant op pass. test=develop (#4158) --- lite/core/mir/elimination/remove_tf_redundant_ops_pass.cc | 5 +++++ 1 file changed, 5 insertions(+) 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 673854b118..d21541b185 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() -- GitLab