fix Conv2DBackpropEltwiseEltwiseFusion pattern

This commit is contained in:
yuchaojie 2022-01-15 10:58:30 +08:00
parent 11789b43db
commit 4f06b25fb5
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ void BnupdateEltwiseEltwiseFusionPass::MatchBnupdateAddRelu(const CNodePtr &cnod
MS_EXCEPTION_IF_NULL(relu_input);
auto add = relu_input->cast<CNodePtr>();
MS_EXCEPTION_IF_NULL(add);
if (AnfAlgo::GetInputTensorNum(cnode) != (ELTWISE_DOUBLE_IN_INPUT_SIZE - 1)) {
if (AnfAlgo::GetInputTensorNum(add) != (ELTWISE_DOUBLE_IN_INPUT_SIZE - 1)) {
return;
}
auto tuple_getitem = add->input(kIndex1);

View File

@ -29,7 +29,7 @@ void Conv2DBackpropEltwiseEltwiseFusionPass::MatchConv2DBackpropInputEltwiseEltw
mindspore::HashSet<AnfNodePtr> record{cnode};
auto eltwise_input = cnode->input(kIndex1);
MS_EXCEPTION_IF_NULL(eltwise_input);
if (CheckDoubleInEltWiseNode(kernel_graph, eltwise_input) && AnfAlgo::GetCNodeName(cnode) == kAddNOpName) {
if (CheckDoubleInEltWiseNode(kernel_graph, eltwise_input) && AnfAlgo::GetCNodeName(eltwise_input) == kAddNOpName) {
(void)record.insert(eltwise_input);
} else {
return;