Pyro: Simple inverse graphics example using SVI not working

122 Views Asked by At

I'm new to pyro and trying to implement a simple inverse graphics problem involving estimating the coordinates of the points of a triangle rendered on a black & white 32x32 image.

So I defined a generative model that generates 3 uniformly random points, renders them into an image and observes the result. I then use SVI with an autoguide (AutoMultivariateNormal) to try and estimates the points for a fixed triangle image. SVI seems to run well and ELBO loss decreases, however when trying to sample from the posterior all I get is uniformly random points with no sign of learning.

My code in a Jupyter notebook with the results:

Screenshot #1

Screenshot #2

Screenshot #3

What am I missing here?

0

There are 0 best solutions below