Search⌘ K
AI Features

Create a Target Array

Understand how to convert MNIST dataset labels into properly rescaled target arrays for neural network training. Learn how to initialize these arrays with small values and assign the correct target values for output nodes. This lesson guides you through the coding process of creating target arrays that improve network training stability.

Construction of a target array

Now we need to turn these ideas into target arrays for the neural network training. We can see that if the label for a training example is 55, we need to create a target array for the output node where all the elements are small except the one corresponding to the label 55. That could look like:

[0,0,0,0,0,1,0,0,0,0][0, 0, 0, 0, 0, 1, 0, 0, 0, 0] ...