This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-1029] Feature request: randint operator #12749
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
b1e7563
randint operator add along with add optional tag to params
ChaiBapchya 89ad2ee
register param
ChaiBapchya 3dabb6d
lint space issue
ChaiBapchya 40adfde
randn issue fix
ChaiBapchya 9827e1e
uniform_int_distribution doesn't support int8, uint8 fix
ChaiBapchya 3363e56
dtype ftype
ChaiBapchya df14294
ftype to dtype - invalid template arg
ChaiBapchya 2e24870
fix template arg issue
ChaiBapchya 693622c
test with int dtype for windows
ChaiBapchya c135e3a
removed int8,uint8 from test
ChaiBapchya d106ff3
gpu implementation
ChaiBapchya ef9e1f1
gpu engine state diff
ChaiBapchya ad574dc
removed gpu support
ChaiBapchya e3f6afc
empty commit
ChaiBapchya 70cb9af
temporary fix : batchnorm flaky test skip
ChaiBapchya bf47cde
removed randn symbol specific code since other PR is on it
ChaiBapchya c3abb3a
revert ndarray/randn for compatibility
ChaiBapchya 4bef3af
added unit test for checking extremes and uniform distribution for su…
ChaiBapchya c201fb3
increased the high val
ChaiBapchya 634b685
Merge branch 'master' into randint and incorporated changes made by c…
ChaiBapchya 761d48c
Merge branch 'master' into randint
ChaiBapchya 8511303
int32 to int64 support, indentation fix, check for optype correctly b…
ChaiBapchya b100935
Merge branch 'master' into randint
ChaiBapchya d7aa9bd
gpu support, revert finfertype using template specialization, remove …
ChaiBapchya a6acc30
Merge branch 'master' into randint, itype (check if integral), made h…
ChaiBapchya 21d5356
fix for invalid template arg by checking for int32,int64
ChaiBapchya 1254fa7
gpu randint in random_generator
ChaiBapchya 9f16408
Merge branch 'master' into randint and syntax,lint fix, discrete_unif…
ChaiBapchya 274366b
sample_uniform issue and param, removed old flaky test skip line
ChaiBapchya e7e622c
replaced discrete_uniform function by rand_int64 for consistency
ChaiBapchya ce3849d
formula update and removed itype
ChaiBapchya 494e416
change ctx to include gpu, randint samepl_op.cu typo
ChaiBapchya ccebcec
trigger ci
ChaiBapchya f583ac0
doc fix, check fix, whitespace remove
ChaiBapchya e3be157
added the without dtype testcase
ChaiBapchya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@leezu over here I use rand_int64() by using mt19937.rand() for 2 32bits
According to the video : https://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful
is this a right way of doing it truly uniform random integer distribution?
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.
Yes, because you're concatenating 2 32bit numbers, where every bit is uniformly random. Thus the resulting 64bits are uniformly random.