fix Conv2DBackpropEltwiseEltwiseFusion pattern
This commit is contained in:
parent
11789b43db
commit
4f06b25fb5
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue