-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Probability Distributions Support #12932
Comments
@mxnet-label-bot [Feature Request, Gluon, Operators] |
Some of them are here - https://mxnet.incubator.apache.org/api/python/ndarray/random.html?highlight=mxnet.ndarray.random#random-distribution-generator But yes we do need a probability submodule within mxnet |
Cheers @anirudhacharya, but the functionality I'm referring to is not covered by those references. I'm talking about functionality beyond just sampling from distributions: calculations of probability density, log probability of a data sample given the distribution, entropy of distribution, etc. And as far as I'm aware the You can't back propagate gradients through samples, so that's why it's important to have such formulas (e.g. log probability) implemented. I can see a single case of probability being returned by |
+1 on this feature |
We have also the need for this as part of our project. I have a local version for computing PDF and LOG_PDF including forward/backward pass (aka gradients for all parameters and samples) for the following distributions: uniform/normal/exponential/gamma/poisson/neg-binomial/Dirichlet. All coded as C++ operators and working on CPU and GPU. But it would take some more effort to make it clean enough to commit them. Have to see when I find the time. Naturally we could extend this for supporting CDF etc. |
@asmushetzel these are awesome stuff. Really look forward to see the contribution back in the future. Do you have some distribution like https://www.tensorflow.org/api_docs/python/tf/initializers/truncated_normal ? |
We are talking with MXFusion people. They don't have the PDFs mentioned in here coded and are not planning to do so. |
PR #14579 will bring in log-pdf/pdf of almost all distributions mentioned above. |
it seems that the solution from PR #14617 is not sufficient to implement fully functional Gaussian policies in continuous action RL tasks. However, in MxNet 2.0 Alpha we have probabilistic support similar to Tensorflow and PyTorch distribution modules. It would be great if we can merge these implementations from 2.0 to 1.x since there is still a large group of users consuming MxNet 1.x. |
Probability Distributions Support
Would be great to have out-of-the-box support for distributions, similar to functionality provided by TensorFlow Probability and PyTorch Distributions. My current use case is for Reinforcement Learning algorithms that learn stochastic action policies (i.e. learn parameters of a distribution from which actions are sampled), and I update these parameters using the likelihood.
MXNet would ideally have methods on each type of distribution for calculating:
And would support a variety of distributions including:
MXFusion is a related project but doesn't have the functionality mentioned above. And it would be ideal to have this as a submodule of the MXNet package.
The text was updated successfully, but these errors were encountered: