未验证 提交 8566b26b 编写于 作者: L liuwei1031 提交者: GitHub

improve efficiency of dot op in dygraph mode (#23857)

上级 a811256d
...@@ -440,6 +440,10 @@ def dot(x, y, name=None): ...@@ -440,6 +440,10 @@ def dot(x, y, name=None):
""" """
op_type = 'dot' op_type = 'dot'
if in_dygraph_mode():
op = getattr(core.ops, op_type)
return op(x, y)
assert x is not None, 'x cannot be None in {}'.format(op_type) assert x is not None, 'x cannot be None in {}'.format(op_type)
assert y is not None, 'y cannot be None in {}'.format(op_type) assert y is not None, 'y cannot be None in {}'.format(op_type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册