提交 657053f2 编写于 作者: D danleifeng 提交者: gongweibao

remove elementwise x_should_larger_than_y restriction;test=develop (#21517)

上级 08483a68
......@@ -226,20 +226,12 @@ def monkey_patch_variable():
out = create_new_tmp_var(current_block(self), dtype=lhs_dtype)
axis = -1
if other_var.shape[0] == -1:
axis = 0
assert len(self.shape) >= len(other_var.shape), (
"The rank of the first argument of an binary operator cannot "
"be smaller than the rank of its second argument: %s vs %s" %
(len(self.shape), len(other_var.shape)))
current_block(self).append_op(
type=op_type,
inputs={'X': [self],
'Y': [other_var]},
outputs={'Out': out},
attrs={'axis': axis})
attrs={'axis': -1})
return out
comment = OpProtoHolder.instance().get_op_proto(op_type).comment
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册