Session Ready
Exercise

Using the network to make predictions

Now that you have trained the network, use it to make predictions for the data in the testing set. The network is called model (same as in the previous exercise), and the loader is called test_loader. We have already initialized variables total and correct to 0.

Instructions
100 XP
  • Set the network in testing (eval) mode.
  • Put each image into a vector using inputs.view(-1, number_of_features) where the number of features should be deducted by multiplying spatial dimensions (shape) of the image.
  • Do the forward pass and put the predictions in output variable.