Cannot find torch.distributions

>>> import torch
>>> m = torch.distributions.Bernoulli(torch.Tensor([0.3]))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'distributions'

This is my pytorch version. But I cannot find torch.distributions. Do I need to specifically install something in order to use distributions module?

DONT USE conda update pytorch. Follow instructions from our website.

I have pytorch version 0.2.0 The problem is that it doesn’t seem to have torch.distributions. How can I get that? Thanks!

How can I get that?

install 0.3.0