<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Inference in Keras is rather simple. One just calls the predict method of the loaded model.
Step1:  Loading the dataset and looking at the first five samples of the test data.
Step2:  Doing the inference
<ASSISTANT_TASK:>
Python Code:
model = keras.models.load_model('example_keras_mnist_model.h5')
model.summary()
Explanation: Inference in Keras is rather simple. One just calls the predict method of the loaded model.
End of explanation
dataset = mnist.load_data()
train_data = dataset[0][0] / 255
train_data = train_data[..., np.newaxis].astype('float32')
train_labels = np_utils.to_categorical(dataset[0][1]).astype('float32')
test_data = dataset[1][0] / 255
test_data = test_data[..., np.newaxis].astype('float32')
test_labels = np_utils.to_categorical(dataset[1][1]).astype('float32')
test_data.shape
for i in range(5):
    plt.imshow(test_data[i, ..., 0])
    plt.show()
Explanation: Loading the dataset and looking at the first five samples of the test data.
End of explanation
softmax_predictions = model.predict(test_data[:5])
softmax_predictions
predictions = np.argmax(softmax_predictions, axis=-1)
predictions
predictions == np.argmax(test_labels[:5], axis=1)
Explanation: Doing the inference
End of explanation
<END_TASK>