(x_train, y_train), (x_test, y_test) = tf.keras.datasets.fashion_mnist.load_data() x_train = x_train.astype(\'float32\') / 255 x_test = x_test.astype(\'float32\') / 255
You are missing the channels dimension (with a value of one), it can be easily corrected by reshaping the array:
x_train = x_train.reshape((-1, 28, 28, 1)) x_test = x_test.reshape((-1, 28, 28, 1))