-
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
[PaddlePaddle hackathon] Add randint_like #36169
Conversation
Thanks for your contribution! |
|
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.
实现一个API的时候,并不急于新增对应的op,可以先查一下已有op是否满足使用要求,如果可以满足使用要求,要尽量复用已有的op,避免堆积重复的功能。
你可以检查看看类似功能的API使用的op
@zhiboniu 好的,那我就用纯python来实现这个api了。 |
@zhiboniu 请问所需的是哪种
|
你可以参照一下行业内其他框架做法,一般都是行业标准。这里的randint应该只是随机值是整数,并不影响其dtype类型,所以dtype应该也可以是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.
lgtm
中文文档已提交PR: PaddlePaddle/docs#4028 |
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
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
* add randint like * rm .cc .cu * Update unity_build_rule.cmake * try to make test pass * use python * update * update randint_like * rename test_randint_like_op -> test_randint_like * update * update randint like docs * update randint like * update * update * add bool * update randint like test * update * update
PR types
New features
PR changes
OPs
Describe
randint_like
, (include calling of lower-level api, test case and doc)