How to change the order of dimensions of images data's shape for a neural network?
Solved! By passing the correct shape into np.reshape().
I really should get to know numpy better, before getting into deep learning.
I have a greyscale images dataset that I want to feed into a neural network.
x_train_grey.shape is (32, 32, 73257)  so I understand it is (dimension_x, dimension_y, batch_size). Because the images are greyscale, there is only one "depth" dimension.
However to feed this data to the neural network it needs to have this shape:(batch_size, dimension_x, dimension_y). With batch_szie at the beginning.
How do I reshape it to this format, so that batch_szie comes before the x, y images dimensions?
Once this is done, I expect to be able to pass this into a neural network (the first layer being Flatten()), like so:
Flatten(input_shape=(32, 32, 1)),.
Cheers!