Creating a convolutional autoencoder
As with regular neural networks, when it comes to images, using convolutions is usually the way to go. In the case of autoencoders, this is no different. In this recipe, we'll implement a convolutional autoencoder to reproduce images from Fashion-MNIST
.
The distinguishing factor is that in the decoder, we'll use reverse or transposed convolutions, which upscale volumes instead of downscaling them. This is what happens in traditional convolutional layers.
This is an interesting recipe. Are you ready to begin?
Getting ready
Because there are convenience functions in TensorFlow for downloading Fashion-MNIST
, we don't need to do any manual preparations on the data side. However, we must install OpenCV
so that we can visualize the outputs of the autoencoder. This can be done with the following command:
$> pip install opencv-contrib-python
Without further ado, let's get started.
How to do it…
Follow...