arianhosseini / GMVAE

Gaussian Mixture Variational Autoencoders

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MNIST experiment

arianhosseini opened this issue · comments

  • make changes to GMVAE.py to get Bernoulli parameters (instead of Gaussian mus and vars) from pygx MLP.
  • implement getHyperMNIST function for MNIST hyperparameters in hyper.py (e.g. the pygx MLP dimensions, hyperparameter for mode =MNIST/Spiral for later)
  • implement sampling from Bernoulli (y_samples) in sample function in main.py

Detail regarding the sampling of MNIST:

In the spiral data sampling, we sampled "all the way" in the sense that, for each random var in the graph of P, we sample according to a distribution. In particular, we sample from p(y|x) at the very end of the process to get the sample of y.

In MNIST, everything stays the same, but we won't sample from p(y|x) at the end. If we do that, the pixels of the sampled images will be white or black, no in between (since p(y|x) is a bernoulli). We don't want that. Instead, just use the mean of the bernoulli distribution in the images (this way, the images will have grayscale).