July 2019
Intermediate to advanced
512 pages
19h 39m
English
Now, we define our decoder; in the decoder, we perform the deconvolution operation with three layers, that is, we upsample the encodings created by the encoder and reconstruct the original image.
Define the first convolutional layer followed by upsampling:
x = Conv2D(8, (3, 3), activation='relu', padding='same')(encoder)x = UpSampling2D((2, 2))(x)
Define the second convolutional layer with upsampling:
x = Conv2D(8, (3, 3), activation='relu', padding='same')(x)x = UpSampling2D((2, 2))(x)
Define the final convolutional layer with upsampling:
x = Conv2D(16, (3, 3), activation='relu')(x)x = UpSampling2D((2, 2))(x)decoded = Conv2D(1, (3, 3), activation='sigmoid', padding='same')(x)
Read now
Unlock full access