I’m new to Pyro, and I really enjoy this framework. I would like to do some modelling that involves a multinomial distribution. I’ve read the enumeration tutorial, and I decided to try it:
def model(): multi = pyro.sample('multi', dist.Multinomial(2, torch.Tensor([1/N for i in range(N)]))) def guide(): multi = pyro.sample('multi', dist.Multinomial(2, torch.Tensor([1/N for i in range(N)]))) print(multi) elbo = pyro.infer.TraceEnum_ELBO(max_plate_nesting=0) elbo.loss(model, pyro.infer.config_enumerate(guide, "parallel"))
The result shows that there was no iteration done:
tensor([0., 0., 0., 0., 1., 0., 0., 0., 0., 1.])
I believe it’s possible to solve the same problem using 2 Categorical distributions, but I was wondering if you plan to support enumeration for multinomial distributions (or if you want to have it, maybe then I could put in my 2 cents).