Cross-validation for neural network evaluation
To evaluate the model, we use a separate test data-set. As in the train data, the images in the test data also need to be reshaped before they can be provided to the fully-connected network because the network expects one column per pixel in the input.
The model
you fit in the previous exercise, and test_data
and test_labels
are available in your workspace.
This exercise is part of the course
Image Modeling with Keras
Exercise instructions
- Reshape the
test_data
so that it can be used to evaluate the model. - Evaluate the model on
test_data
usingtest_labels
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Reshape test data
test_data = test_data.____(____, ____)
# Evaluate the model
model.evaluate(____, ____)