Implementing Bayesian GAN


I’ve been trying to implement the Bayesian GAN model from Basically, you need to use a Bayesian setting on a GAN model. I am curious if it is doable in Edward since I realize GAN is currently trained by GANInference in Edward. Can I somehow specify an SGHMC to sample from a GAN?


There are two ways of going about this. In one, you can implement a new GANInference subclass while perturbing all the gradient updates with SGHMC noise terms. One logistical difficulty is figuring out how to store these new parameters (which is an “MCMC sample”) before it gets overwritten on the next iteration.

In another, you can implement a new SGHMC subclass. You would rewrite some of the logic around the log prob calculation so that it can alternate updates between two sets of parameters.