Denoising autoencoder in Keras
Now let's build the same denoising autoencoder in Keras.
As Keras takes care of feeding the training set by batch size, we create a noisy training set to feed as input for our model:
X_train_noisy = add_noise(X_train)
The complete code for the DAE in Keras is provided in the notebook ch-10_AutoEncoders_TF_and_Keras
.
The DAE Keras model looks like the following:
Layer (type) Output Shape Param # ================================================================= dense_1 (Dense) (None, 512) 401920 _________________________________________________________________ dense_2 (Dense) (None, 256) 131328 _________________________________________________________________ dense_3 (Dense) (None, 256) 65792 _________________________________________________________________ dense_4 (Dense) (None, 512) 131584 _________________________________________________________________...