From the course: Neural Networks and Convolutional Neural Networks Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Preprocessing the test data

Preprocessing the test data

From the course: Neural Networks and Convolutional Neural Networks Essential Training

Start my 1-month free trial

Preprocessing the test data

- [Instructor] So let's add a couple of cells to our Jupyter notebook. So I just type escape and A. Now remember the big picture is that for the training set, we have the images, so we've just converted, or reshaped our images to being of a single layer with 784 nodes. Now our output is going to be 10 different classes, so one for each digit. So let's see what the shape of our output is currently. So if I type the y_train.shape, I can see that my output is in fact a one dimensional array, and that's the case for my test data too. So we actually want the last layer to be one where we can send out the result, or output, into one of 10 bins, representing the digits zero to nine. And we can use that, using the two categorical function that we imported earlier. So let's use two categorical, which is the two categorical method on our Y train data, and this time, we want it to have 10 different bins. And so if I now assign that to my variable y train, and I print out the shape of y train, I…

Contents