未验证 提交 b158a21b 编写于 作者: L LutaoChu 提交者: GitHub

fix bug: cross OP behavior is not as expected when axis=0

fix the cross OP behavior is not as expected when axis=0
上级 e3c73b98
...@@ -632,7 +632,7 @@ def cross(x, y, axis=None, name=None): ...@@ -632,7 +632,7 @@ def cross(x, y, axis=None, name=None):
# [0. 0. 0.]] # [0. 0. 0.]]
""" """
if in_dygraph_mode(): if in_dygraph_mode():
if axis: if axis is not None:
return core.ops.cross(x, y, 'dim', axis) return core.ops.cross(x, y, 'dim', axis)
else: else:
return core.ops.cross(x, y) return core.ops.cross(x, y)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册