when using TraceEnum_ELBO, I got error saying “RuntimeError: invalid argument 1: matrix or a vector expected at /pytorch/aten/src/TH/generic/THTensorMoreMath.cpp:555”.
So I use Trace_ELBO, it seems work smoothly.
It seems that the model can not get the correct results, most of the samples are regarded as from the some cluster. I don’t where is the bug…
Did you check out the gaussian mixture model tutorial in Pyro? I doubt if you’ll get reasonable results using Trace_ELBO with a categorical sample in your model. The failure that you see with TraceEnum_ELBO is because of unexpected/unaccounted batch shapes. For instance, one thing that I see missing is a plate for the number of components. You might find the gmm tutorial useful in understanding and debugging these shape issues.
Hi, I work following the tutorial Gaussian Mixture Model. At the tail of this tutorial, we get a variable called assignment_probs to indicate the probability of assignment.
It’s a little strange that assignment_probs.sum(dim=1) is not a tensor vector of 1, but tensor([0.9518, 0.9517, 0.9517, 0.9518, 0.9518], grad_fn=<SumBackward2>).