July 2019
Intermediate to advanced
512 pages
19h 39m
English
In this section, we will learn how to denoise the images using DAE. We use CAE for denoising the images. The code for DAE is just the same as CAE, except that here, we use noisy images in the input. Instead of looking at the whole code, we will see only the respective changes. The complete code is available on GitHub at https://github.com/PacktPublishing/Hands-On-Deep-Learning-Algorithms-with-Python.
Set the noise factor:
noise_factor = 1
Add noise to the train and test images:
x_train_noisy = x_train + noise_factor * np.random.normal(loc=0.0, scale=1.0, size=x_train.shape) x_test_noisy = x_test + noise_factor * np.random.normal(loc=0.0, scale=1.0, size=x_test.shape)
Clip the train and test set by 0 and 1:
x_train_noisy ...
Read now
Unlock full access