text_plain_output_1.png
import keras

img_cols, img_rows = (28, 28)
input_shape = (img_cols, img_rows, 1)
batch_size = 128
num_classes = 10
epochs = 12
x_train = x_train.reshape(x_train.shape[0], img_cols, img_rows, 1)
x_test = x_test.reshape(x_test.shape[0], img_cols, img_rows, 1)
y_train = keras.utils.to_categorical(y_train, num_classes)
y_test = keras.utils.to_categorical(y_test, num_classes)
print(x_train.shape)
print(x_test.shape)
print(y_train.shape)