What should be the 5th dimension for the input to 3D-CNN while working with hyper-spectral images?
If you want to convolve along the dimension of your channels, you should add a singleton dimension in the position of channel.  If you don't want to convolve along the dimension of your channels, you should use a 2D CNN.
I have a hyperspectral image having dimension S * S * L where S*S is the spatial size and L denotes the number of spectral bands.
Now the shape of my X (image array) is: (1, 145, 145, 200) where 1 is the number of examples, 145 is the length and width of the image and 200 is no. of channels of the image.
I want to input this small windows of this image (having dimension like W * W * L; W < S) into a 3D CNN, but for that, I need to have 5 dimensions in the following format: (batch, length, width, depth, channels).
It seems to me I am missing one of the spatial dimensions, how do I convert my image array into a 5-dimensional array without losing any information?
I am using python and Keras for the above.