How it works...
In step 1, we built a Keras functional autoencoder model. We first defined an input layer and an encoder and decoder network and then combined them to create a deep autoencoder. The encoder network reduces the input of 784 dimensions to 32 dimensions. The decoder network reconstructs 32 dimensions (the input to the decoder) to 784 dimensions. In step 2, we built a separate encoder model. The encoder model shared the encoder layers of the autoencoder, which means the weights are shared.
In the next step, we defined a separate decoder model. This model shared the decoder layers of the autoencoder. We first defined an encoded input layer and then extracted dense layers from the autoencoder to create the decoder. In step 4, w ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access