text_plain_output_1.png
from keras.utils import np_utils

from keras.utils import np_utils
print('Before:')
print(y_train_matrix[:8])
y_train_matrix = np_utils.to_categorical(y_train_matrix, 10)
y_test_matrix = np_utils.to_categorical(y_test_matrix, 10)
print('After:')
print(y_train_matrix[:8])