A vanilla autoencoder looks as follows:
As displayed in the preceding diagram, a Vanilla autoencoder reconstructs the input with a minimal number of hidden layers and hidden units in its network.
To understand how a vanilla autoencoder works, let's go through the following recipe, where we reconstruct MNIST images using a lower-dimensional encoded version of the original image (the code file is available as Auto_encoder.ipynb in GitHub):
- Import the relevant packages:
import tensorflow as tfimport kerasimport numpy as npfrom keras.datasets import mnistfrom keras.models import Sequentialfrom keras.layers import Densefrom ...