This code is the implementation of paper -
MADE: Masked Autoencoder for Distribution Estimation
Code is inspired from - https://github.com/karpathy/pytorch-made
MNIST Dataset is used for training. Pixel values are converted to binary values before training. Image size is reduced to 20 x 20 to reduce model complexity.
MADE defines implicit joint input image probability using the chain rule. The linear connections between layers is adjusted (masked) in a way so that each output probability is the conditional probability distribution based on all previously sampled pixel values.
For binary pixel value case, sampling happens assuming the bernoulli distribution.
Training loss is plotted after each iteration on batch of 128 images.
Validation loss is calculated on the valid data after each epoch.