Auto Encoder s
Auto Encoder s
• The architecture of an
autoencoder consists of three
main components: the
Encoder, the Bottleneck
(Latent Space) and the
Decoder. Let’s deep dive into
each part to understand how
they work together.
Autoencoder that can compress the image file for
the MNIST dataset, by using the following
mechanism:
Encoder
• The encoder is the part of the network that takes the input data and
compresses it into a smaller, lower-dimensional representation.
• Input Layer: This is where the original data enters the network, e.g., an
image or a set of features.
• Hidden Layers: These layers apply transformations to the input data. The
encoder’s goal is to extract essential features and reduce the data’s
dimensionality.
The bottleneck is the smallest layer of the network where the data is represented in
its most compressed form. It’s often referred to as the latent space or code.
• This layer contains a reduced set of features representing the most important
information from the input.
• The idea is that through this compression, the network learns the key patterns and
structures of the input data.
Decoder
The decoder is responsible for taking the compressed representation from the
latent space and reconstructing it back into the original data form.
• Hidden Layers: The decoder uses a series of layers to gradually expand the
compressed data back to the original input’s dimensions.
• Output Layer: This layer produces the reconstructed data and aims to closely
resemble the input data.
Loss Function in Autoencoder Training
During training an autoencoder aims to minimize the reconstruction loss which
measures the difference between the original input and the reconstructed
output. The choice of loss function depends on the type of data:
• Mean Squared Error (MSE): This is commonly used for continuous data. It
measures the average squared differences between the input and the
reconstructed data.