-
Notifications
You must be signed in to change notification settings - Fork 242
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
【Hackathon 6th No.31】paddle Normal 分布支持复数 #893
Conversation
float mean, | ||
float std, | ||
int seed, | ||
bool complex_gaussian, |
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.
不要给kernel新增参数,合理的设计是通过模板区分是否是复数类型,然后如果是复数类型则调用对应GaussianKernel 的复数特化,可以参考这种写法,https://github.com/PaddlePaddle/Paddle/pull/63720/files
template <typename T, typename Context> | ||
void GaussianKernel(const Context& dev_ctx, | ||
const IntArray& shape, | ||
float mean, |
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.
同时这里的mean应该不是float表示了
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.
如果这里复数特化的时候mean用std::complex<float>
类型的话,infermeta要怎么改呢
\end{aligned} $$ | ||
|
||
# 六、测试和验收的考量 | ||
|
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.
测试可以写的更具体一点,要测试哪些性质,比如标准正态分布实部和虚部各自的方差是1/2等等这种
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.
已更新
@NKNaN 可以先完善一下“测试和验收的考量” 这一部分 |
好的 |
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
No description provided.