-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[New API] add new api paddle.mode and paddle.Tensor.mode #38446
Conversation
Thanks for your contribution! |
} | ||
|
||
template <typename DeviceContext, typename T> | ||
class ModeCPUKernel : public framework::OpKernel<T> { |
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 define ModeCPUKernel and ModeOpCUDAKernel in one class template?
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.
This will be fixed later
paddle/fluid/operators/mode_op.h
Outdated
framework::DDim trans_out_dims(in_dims); | ||
|
||
for (size_t i = 0; i < trans.size(); i++) { | ||
trans_dims[i] = in_dims[trans[i]]; |
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.
the variable name of trans/trans_dims is ambiguous, trans_axis or trans_shape may be clear ?
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.
LGTM
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.
LG API
PR types
New features
PR changes
OPs
Describe
add new api paddle.mode and paddle.Tensor.mode