Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement nnabla.experimental.distributions modules #392

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

takuseno
Copy link
Contributor

@takuseno takuseno commented Apr 5, 2019

I implemented distribution modules such as chainer and tensorflow.

import nnabla as nn

from nnabla.experimental.distributions import Normal

loc = nn.Variable((2, 3))
scale = nn.Variable((2, 3))
inpt = nn.Variable((2, 3))
dist = Normal(loc, scale)

entropy = dist.entropy()
sample = dist.sample()
pdf = dist.prob(inpt)
variance = dist.variance()
mean = dist.mean()
std = dist.stddev()

For now, I've implemented three distributions.

  • uniform distirbution
  • normal distribution
  • multivariate normal distrition

In testing, scipy.stats package is used as reference.

TODO

  • determine sample interface
  • unit test
  • add comments
  • add documents

Future works

cc @TE-TakuyaNarihira @TE-AkioHayakawa

@takuseno takuseno changed the title [WIP] Implement nnabla.experimental.distributions modules Implement nnabla.experimental.distributions modules Apr 18, 2019
@takuseno
Copy link
Contributor Author

@TE-AkioHayakawa
I've created a squashed version of this PR at #565 . Please check it up :)

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

Successfully merging this pull request may close these issues.

1 participant