...

/

Prepare the MNIST Training Data

Prepare the MNIST Training Data

Learn how to rescale the input values to a smaller range, 0–1, to prepare it for training.

We'll cover the following...

Data preprocessing

We’ve learned how to get data out of the MNIST data files and disentangle it so we can make sense of it and visualize it. We want to train our neural network with this data, but we need to think about preparing this data before we throw it at our neural network.

We saw earlier that neural networks work better if the input data and the output values are of the right shape, so that they stay within the comfort zone of the network node activation functions.

Rescaling

First we need to rescale the input color values from the larger range 02550–255 to the much smaller range 0.011.00.01–1.0. We’ve ...