Autoencoders with convolutions

We just learned what autoencoders are in the previous section. We learned about a vanilla autoencoder, which is basically the feedforward shallow network with one hidden layer. Instead of keeping them as a feedforward network, can we use them as a convolutional network? Since we know that a convolutional network is good at classifying and recognizing images (provided that we use convolutional layers instead of feedforward layers in the autoencoders), it will learn to reconstruct the inputs better when the inputs are images.

Thus, we introduce a new type of autoencoders called CAEs that use a convolutional network instead of a vanilla neural network. In the vanilla autoencoders, encoders and decoders are basically a feedforward network. But in CAEs, they are basically convolutional networks. This means the encoder consists of convolutional layers and the decoder consists of transposed convolutional layers, instead of a feedforward network. A CAE is shown in the following diagram:

As shown, we feed the input image to the encoder that consists of a convolutional layer, and the convolutional layer performs the convolution operation and extracts important features from the image. We then perform max pooling to keep only the important features of the image. In a similar fashion, we perform several convolutional and max-pooling operations and obtain a latent representation of the image, called a bottleneck.

Next, we feed the bottleneck to the decoder that consists of deconvolutional layers, and the deconvolutional layer performs the deconvolution operation and tries to reconstruct the image from the bottleneck. It consists of several deconvolutional and upsampling operations to reconstruct the original image.

Thus, this is how CAE uses convolutional layers in the encoder and transpose convolutional layers in the decoders to reconstruct the image.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset