Hello there I'm trying to convert the MNIST dataset to greyscale with python but I can not do it right.
code:
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train = x_train.reshape(60000, 28, 28, 1)
x_test = x_test.reshape(10000, 28, 28, 1)
When I enter the above I get this error:
TypeError: Invalid shape (28, 28, 1) for image data
What am I doing wrong?