You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/05/02 00:10:51 UTC

[GitHub] leezu commented on issue #10768: Use numpy in RandomSampler

leezu commented on issue #10768: Use numpy in RandomSampler
URL: https://github.com/apache/incubator-mxnet/pull/10768#issuecomment-385826952
 
 
   It doesn't perform well. At least not with the naive approach of:
   
   ```
   ...: def sample(length):
       ...:     indices = mx.nd.arange(length)
       ...:     mx.nd.random.shuffle(indices)
       ...:     return (indices[i].asscalar() for i in range(indices.shape[0]))
   
   ```
   
   What did you have in mind?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services