Deep convolutional autoencoder

Let's try denoising the images with a deeper model and more filters in each convolutional layer.

We start by defining a new Sequential class:

conv_autoencoder = Sequential()

Next, we add three convolutional layers as our encoder, with 32, 16, and 8 filters:

conv_autoencoder.add(Conv2D(filters=32, kernel_size=(3,3),                            input_shape=(420,540,1),                             activation='relu', padding='same'))conv_autoencoder.add(Conv2D(filters=16, kernel_size=(3,3),                            activation='relu', padding='same'))conv_autoencoder.add(Conv2D(filters=8, kernel_size=(3,3),                            activation='relu', padding='same'))

Similarly for the decoder, we add three convolutional layers with 8, 16, and 32 filters:

conv_autoencoder.add(Conv2D(filters=8, kernel_size=(3,3),  activation='relu', ...

Get Neural Network Projects with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.