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/09/07 17:06:05 UTC
[GitHub] safrooze opened a new issue #12478: Feature Request: randint
safrooze opened a new issue #12478: Feature Request: randint
URL: https://github.com/apache/incubator-mxnet/issues/12478
## Description
MXNet has no `randint` implementation and integer sampling can be both limiting and confusing to developers:
* If using random_uniform with 'float32', the range is limited to 16.6M, beyond with there is no one to one mapping between float and int values.
* My tests show that random_uniform with 'float64' seem to address the issue, but this is not obvious to most developers and it may be extra unnecessary precision to achieve the necessary accuracy.
* It isn't very well known how to do proper random integer sampling using an underlying float sampling, i.e.:
```
randint = cast(clip(random.uniform(low, high, shape), low, high-1), 'int32')
```
A `randint` operator implementation will solve all above issues.
----------------------------------------------------------------
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