Initializing Categorical distribution with logits

Hi there,

I am trying to initialize a categorical distribution with log probabilities by calling

l = torch.randn(3)
dist = torch.distributions.Categorical(logits=l)

and here is the error message:

TypeError: __init__() got an unexpected keyword argument 'logits'

My pytorch version is 0.3.1.post2. Am I doing anything wrong here?


From the documentation for 0.3.1 here there is no logits keyword for Categorical.
This has only been added in the master branch for now and is available if you compile from source or will be in the 0.4 release when its out.