提交 d2ea6d8c 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!4698 Add shape inference in constant multiplication simplification

Merge pull request !4698 from Giancarlo/setshape_constmult
......@@ -53,7 +53,9 @@ AnfNodePtr ArithmeticSimplify::operator()(const OptimizerPtr &, const AnfNodePtr
auto ttmul = NewCNode({mul_node, const_.GetNode(node), const_2.GetNode(node)}, node->func_graph());
return NewCNode({mul_node, x.GetNode(node), ttmul}, node->func_graph());
}
return NewCNode({mul_node, x.GetNode(node), new_mul_tensor}, node->func_graph());
auto new_cnode = NewCNode({mul_node, x.GetNode(node), new_mul_tensor}, node->func_graph());
new_cnode->set_abstract(node->abstract());
return new_cnode;
};
MATCH_REPLACE_LAMBDA(node, const_ * (const_2 * x), const_dup_lambda);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册