Hello question regarding reshaping an array.
I have an array train_x (2D) which content is (103,784)
In this case 103 is the amount of examples.
784 is the input of my neural network.
Now I want to reshape from 2D to 4D
I use the following command:
train_x = np.reshape(train_x, (103, 28, 28, 1))
Is it correct that in this case 103 is still the amount of training examples and that in this case my input 784 is devided into a matrix of 28x28? 1 in this case is my channel, not using RGB (otherwhise the channel should be 3).
If my assumption is not correct please can somebody advice how to reshape from 2D to 4D to archive the above? tnx
np.arange(12).reshape(3,4).reshape(3,2,2,1)
– Dancer