De-noising like an autoencoder
Okay, you have just built an autoencoder
model. Let's see how it handles a more challenging task.
First, you will build a model that encodes images, and you will check how different digits are represented with show_encodings()
. To build the encoder you will make use of your autoencoder
, that has already being trained. You will just use the first half of the network, which contains the input and the bottleneck output. That way, you will obtain a 32 number output which represents the encoded version of the input image.
Then, you will apply your autoencoder
to noisy images from MNIST
, it should be able to clean the noisy artifacts.
X_test_noise
is loaded in your workspace. The digits in this noisy dataset look like this:
Apply the power of the autoencoder!
This exercise is part of the course
Introduction to Deep Learning with Keras
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Build your encoder by using the first layer of your autoencoder
encoder = Sequential()
encoder.add(____.layers[____])
# Encode the noisy images and show the encodings for your favorite number [0-9]
encodings = ____.predict(____)
show_encodings(____, number = 1)