Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Numpy Extension] Add categorical sampling to npx #18270

Closed
sxjscience opened this issue May 10, 2020 · 0 comments
Closed

[Numpy Extension] Add categorical sampling to npx #18270

sxjscience opened this issue May 10, 2020 · 0 comments

Comments

@sxjscience
Copy link
Member

We should provide an API that offers the same functionality as https://www.tensorflow.org/api_docs/python/tf/random/categorical in the numpy interface.

In fact, we have this functionality in the legacy mx.nd namespace, i.e.,mx.nd.sample_multinomial: See https://github.com/apache/incubator-mxnet/blob/eceb5f2c1c494094c1a697286f2c4560b7ca472e/src/operator/random/sample_multinomial_op.cc#L33

One straightforward extension is to register this op as mx.npx.random.categorical.

@yzhliu

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant