-
Notifications
You must be signed in to change notification settings - Fork 5.9k
add interpolation op #4500
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
add interpolation op #4500
Conversation
|
The construction of interp_grad op is : |
Xreki
left a comment
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.
Good job! It is almost ok with some naming and description issues for me. About the op's name, I am not sure whether the abbreviation InterpOp is ambiguous.
paddle/operators/interp_op.cc
Outdated
| // MinusOut = X - Y | ||
| auto x = Input("X"); | ||
| auto y = Input("Y"); | ||
| auto minus_out = Output("MinusOut"); |
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.
How about rename MinusOut to SubOut, since minus op is not used here anymore?
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.
Done.
paddle/operators/interp_op.cc
Outdated
| "saving the mul mul of (X - Y) and W") | ||
| .AsIntermediate(); | ||
| AddOutput("Out", | ||
| "A 2-D Tensor, the output of interp_op, same shape with X"); |
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.
Would there more detail comments about inputs and outputs? About the format, you can refer to https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/operators/name_convention.md#opprotomaker-names
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.
Done.
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.
About the op's name, I am not sure whether the abbreviation
InterpOpis ambiguous.
Discussed with @qingqing01 , as numpy uses numpy.interp, we can use abbreviation name as well.
paddle/operators/interp_op.cc
Outdated
| // MinusOut = X - Y | ||
| auto x = Input("X"); | ||
| auto y = Input("Y"); | ||
| auto minus_out = Output("MinusOut"); |
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.
Done.
paddle/operators/interp_op.cc
Outdated
| "saving the mul mul of (X - Y) and W") | ||
| .AsIntermediate(); | ||
| AddOutput("Out", | ||
| "A 2-D Tensor, the output of interp_op, same shape with X"); |
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.
Done.
Xreki
left a comment
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
solve #4319