-
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 random related operators #3596
refine random related operators #3596
Conversation
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.
so, we decide to implement all the random methods in thrust?
Not a good news, we need to implement more generator in thrust by ourselves such as random_gama, ramdom_guassian
tf.random_normal
tf.truncated_normal
tf.random_uniform
tf.random_shuffle
tf.random_crop
tf.multinomial
tf.random_gamma
// And we need a global random seed configuration. | ||
int seed = context.op_.GetAttr<int>("seed"); | ||
unsigned int seed = | ||
static_cast<unsigned int>(context.op_.GetAttr<int>("seed")); |
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.
it is useless to convert int to unsigned int. Attribute Member
can not contain an unsigned int.
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.
And maybe we can add unsigned to attribute map
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++.
we discussed offline and reach an agreement.
1, use cuda built-in need to implement the odd and even number generator.
2, it's really time cost to create a curandom generator.
Fix #3598