-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Zero-Dim] support input 0D Tensor for sundary api #47734
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
0f6316e
to
b1c1c76
Compare
] | ||
|
||
binary_api_list_without_grad = [ | ||
{'func': paddle.pow, 'cls_method': '__pow__'}, | ||
{'func': paddle.add, 'cls_method': '__add__'}, | ||
{'func': paddle.subtract, 'cls_method': '__sub__'}, | ||
{'func': paddle.multiply, 'cls_method': '__mul__'}, | ||
{'func': paddle.divide, 'cls_method': '__div__'}, | ||
{'func': paddle.subtract, 'cls_method': '__sub__'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did paddle.subtract
repeat 4 times, while paddle.add
2 times, what is the meaning of repeat in the list?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we add paddle.maximum
and paddle.minimum
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前只支持了部分二元,就是这个list中包含的。这两个还未支持0D,后面会加。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did
paddle.subtract
repeat 4 times, whilepaddle.add
2 times, what is the meaning of repeat in the list?
Some mistake, have fixed it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, thanks
{'func': paddle.equal, 'cls_method': '__eq__'}, | ||
{'func': paddle.not_equal, 'cls_method': '__ne__'}, | ||
{'func': paddle.greater_equal, 'cls_method': '__ge__'}, | ||
{'func': paddle.greater_than, 'cls_method': '__gt__'}, | ||
{'func': paddle.less_equal, 'cls_method': '__le__'}, | ||
{'func': paddle.less_than, 'cls_method': '__lt__'}, | ||
{'func': paddle.remainder, 'cls_method': '__mod__'}, | ||
paddle.mod, | ||
paddle.floor_mod, | ||
paddle.logical_and, | ||
paddle.logical_or, | ||
paddle.logical_xor, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we add paddle.bitwise_and/or/xor
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已添加
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR types
New features
PR changes
APIs
Describe
为无需测反向的这类API支持输入0D Tensor,例如判断类、属性等API,如下: