added rand_uniform operation closes #1958 (#2051)
New op that populates a shape with random numbers with a uniform distribution. The rand_uniform op. can implement the Onnx RandomUniform instruction, and can also create the random number sequence necessary to implement Multinomial. (At this time, our Onnx Multinomial parsing generates a random sequence of numbers when parsing as a workaround, so that the resulting program uses the same "random" set every time.) Arguments: shape, seed. Shape is required; can be static or dynamic. Seed is still optional in this version. If it's not given at inference time, use the value in the creation attribute seed. Update: deleted A boolean use_auto_seed causes any given seed to be ignored.
Showing
test/ref/random_seed.cpp
0 → 100644
test/ref/random_uniform.cpp
0 → 100644
Please register or sign in to comment