change '/' method from scale Op to elementwise_div Op#33279
Merged
MingMingShangTian merged 5 commits intoPaddlePaddle:developfrom Jun 2, 2021
Merged
change '/' method from scale Op to elementwise_div Op#33279MingMingShangTian merged 5 commits intoPaddlePaddle:developfrom
MingMingShangTian merged 5 commits intoPaddlePaddle:developfrom
Conversation
… equal the result of elementwise_div method
|
Thanks for your contribution! |
chenwhql
reviewed
Jun 2, 2021
Contributor
chenwhql
left a comment
There was a problem hiding this comment.
better to add a unittest for this case?
zhwesky2010
reviewed
Jun 2, 2021
| _scalar_div_)), | ||
| ('__truediv__', _binary_creator_('__truediv__', 'elementwise_div', | ||
| False, _scalar_div_)), | ||
| ('__rdiv__', _binary_creator_('__rdiv__', 'elementwise_div', True, |
Contributor
There was a problem hiding this comment.
__rdiv__ 在python3也没有了吗
Contributor
Author
There was a problem hiding this comment.
是的,没有了。 参考python3 的文档 https://docs.python.org/3/reference/datamodel.html
zhwesky2010
previously approved these changes
Jun 2, 2021
chenwhql
reviewed
Jun 2, 2021
| c = paddle.full([2, 2, 2], 0.5, dtype="float32") | ||
| self.check_operation(a, b, c, '/') | ||
|
|
||
| # tensor(float32) / scalar(int) |
MingMingShangTian
added a commit
to MingMingShangTian/Paddle
that referenced
this pull request
Jun 3, 2021
…3279) * fix the bug of div operation result using scale method do not exactly equal the result of elementwise_div method * remove __div__ , __rdiv__ methods which do not define in python3 * modify the note * add test case * add test case
MingMingShangTian
added a commit
to MingMingShangTian/Paddle
that referenced
this pull request
Sep 10, 2021
…Paddle#33279)" This reverts commit ae93d9c.
MingMingShangTian
added a commit
that referenced
this pull request
Sep 13, 2021
AnnaTrainingG
pushed a commit
to AnnaTrainingG/Paddle
that referenced
this pull request
Sep 29, 2021
…Paddle#33279)" (PaddlePaddle#35650) This reverts commit ae93d9c.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
Bug fixes
PR changes
APIs
Describe
_scalar_div_function.The bug is as follow.
And after fixing the bug

__div__,__rdiv__methods which do not be defined in python3 standard.