From f50de679d35039878fe7513356de46ebab632ae5 Mon Sep 17 00:00:00 2001 From: yeliang2258 <30516196+yeliang2258@users.noreply.github.com> Date: Mon, 14 Nov 2022 11:25:17 +0800 Subject: [PATCH] fix squueze_transpose (#47911) --- paddle/fluid/framework/ir/graph_pattern_detector.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/framework/ir/graph_pattern_detector.cc b/paddle/fluid/framework/ir/graph_pattern_detector.cc index d03c5647e6..45c4c50318 100644 --- a/paddle/fluid/framework/ir/graph_pattern_detector.cc +++ b/paddle/fluid/framework/ir/graph_pattern_detector.cc @@ -961,6 +961,7 @@ PDNode *patterns::OperatorActivation::operator()( PDNode *patterns::Squeeze2Transpose2::operator()() { auto *squeeze2_op_in = pattern->NewNode(squeeze2_op_in_repr()) ->AsInput() + ->assert_has_n_outputs(1) ->assert_is_op_input("squeeze2", "X"); auto *squeeze2_op = pattern->NewNode(squeeze2_op_repr()) ->assert_is_op("squeeze2") -- GitLab