eric-haibin-lin opened a new issue #7426: mx random seed doesn't work for 
random_uniform/random_normal on gpu
URL: https://github.com/apache/incubator-mxnet/issues/7426
 
 
   For bugs or installation issues, please provide the following information.
   The more information you provide, the more likely people will be able to 
help you.
   
   ## Environment info
   Operating System: DL AMI
   
   Or if installed from source: 
   
   MXNet commit hash (`git rev-parse HEAD`): 
251ae71a20d8318ab20f4c19520f74b881fdf3ff
   
   ## Minimum reproducible example
   if you are using your own code, please provide a short script that 
reproduces the error.
   ```
   import mxnet as mx
   import numpy as np
   shape = (2, 2)
   out1 = mx.nd.zeros(shape=shape, ctx=mx.gpu(0))
   out2 = mx.nd.zeros(shape=shape, ctx=mx.gpu(0))
   mx.random.seed(0)
   np.random.seed(0)
   mx.nd.random_uniform(out=out1)
   print(out1.asnumpy())
   mx.random.seed(0)
   np.random.seed(0)
   mx.nd.random_uniform(out=out2)
   print(out2.asnumpy())
   ```
   
   ```
   [[ 0.74021935  0.9209938 ]
    [ 0.03902049  0.96896291]]
   
   [[ 0.92514056  0.4463501 ]
    [ 0.66731918  0.10993068]]
   ```
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to