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
From the course: Neural Networks and Convolutional Neural Networks Essential Training
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Understanding the components in Keras2m 12s
-
(Locked)
Setting up a Microsoft account on Azure1m 57s
-
(Locked)
Introduction to MNIST5m 33s
-
(Locked)
Preprocessing the training data4m 38s
-
(Locked)
Preprocessing the test data1m 58s
-
(Locked)
Building the Keras model2m 23s
-
(Locked)
Compiling the neural network model2m 18s
-
(Locked)
Training the neural network model1m 27s
-
(Locked)
Accuracy and evaluation of the neural network model2m 4s
-
(Locked)
-
-
-
-
-