-
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
Refine paddle.manual_seed #26496
Refine paddle.manual_seed #26496
Conversation
Thanks for your contribution! |
✅ This PR's description meets the template requirements! |
abdff7b
to
a297fd2
Compare
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.
lgtm
028b00f
to
335a19b
Compare
4a9014f
to
ea5e4af
Compare
ea5e4af
to
d2ce796
Compare
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
self.generator.manual_seed(seed) | ||
Parameters: | ||
place(CPUPlace|CUDAPinnedPlace|CUDAPlace, optional): The place to allocate Tensor. Can be | ||
CPUPlace, CUDAPinnedPlace, CUDAPlace. Default: None, means global place. |
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.
用户看到global place
,会不知道啥意思的。
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.
Place参数的文档信息是和paddle.to_tensor()一致的,我后面再一起提个文档PR完善下这个描述。
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.
LGTM
PR types
Function optimization
PR changes
APIs
Describe
Refine
paddle.manual_seed()
random_seed
, replacesprogram.random_seed=seed
withpaddle.manual_seed(seed)
in several unittests.NOTE, Currently there are 2 conditions of random number generation for users:
(1) op seed is not set, use default CPU Generator
(2) op seed is set, use a unique random engine for each and set the seed as op seed