Creating a simple fully connected autoencoder
Autoencoders are unusual in their design, as well as in terms of their functionality. That's why it's a great idea to master the basics of implementing, perhaps, the simplest version of an autoencoder: a fully connected one.
In this recipe, we'll implement a fully connected autoencoder to reconstruct the images in Fashion-MNIST
, a standard dataset that requires minimal preprocessing, allowing us to focus on the autoencoder itself.
Are you ready? Let's get started!
Getting ready
Fortunately, Fashion-MNIST
comes bundled with TensorFlow, so we don't need to download it on our own.
We'll use OpenCV
, a famous computer vision library, to create a mosaic so that we can compare the original images with the ones reconstructed by the autoencoder. You can install OpenCV
effortlessly with pip
:
$> pip install opencv-contrib-python
Now that all the preparations have been handled, let's take a...