Setting up denoising autoencoders
Denoising autoencoders are a special kind of autoencoder with a focus on extracting robust features from the input dataset. Denoising autoencoders are similar to the previous model except with a major difference that the data is corrupted before training the network. Different approaches for corruption can be used such as masking, which induces random error into the data.
Getting ready
Let's use the CIFAR-10 image data to set up a denoising dataset:
- Download the CIFAR-10 dataset using the
download_cifar_data
function (covered in Chapter 3, Convolution Neural Network) - TensorFlow installation in R and Python
How to do it...
We first need to read the dataset.
Reading the dataset
- Load the
CIFAR
dataset using the steps explained in Chapter 3, Convolution Neural Network. The data filesdata_batch_1
anddata_batch_2
are used to train. Thedata_batch_5
andtest_batch
files are used for validation and testing, respectively. The data can be flattened using theflat_data
function...