Possible to implement a GAN architecture in pyro ? Any tips?

Hi,

I have successfully adapted the VAE tutorial in pyro for my use case involving images. As expected, the quality of images generated weren’t of high quality. (Although the vae model learnt the distribution and was able to reconstruct the images to an extent)

Is it possible to implement a GAN in pyro ? (I need to do condition and intervention queries on some of the nodes of the DAG - that produces the image and hence i need a probabilistic model)

In GAN we need two optimizer’s … one for generator and one for discriminator. That would essentially mean we need to have 2 models and guide from a pyro standpoint ?

Any tips on this would be appreciated. @eb8680_2 @martinjankowiak @jpchen

Since what you’re after is a better generative model rather than a GAN specifically, I suggest using a normalizing flow instead, which are easier to train and play nicely with the rest of Pyro. See e.g. the GLOW paper for an example of the expressive power of modern normalizing flow-based generative models.

See the normalizing flows tutorial for an introduction to their use in Pyro, and the documentation for a list of available flows and references to the papers where they were first described.