What are the 4 values passed in shape for ndarray in numPy?
When the shape is of length 4, it means that that you have a "4D-tensor". A 4D-tensor is a group of 3D-tensor. For instance if A is a 4D-tensor, A[0] is a 3D-tensor that is a the first element of this group. Here the first number 1 means that you group is only composed of one 3D-tensor. Then, you guess that a 3D-tensor is a group of 2D-tensor (also called matrices). Here your 3D-tensor is composed of 224 2D-tensors (the second number). Then each 2D-tensor is composed of 224 1D-tensors (vectors) of lenght 3.
In your particular case you can also (more simply) view your data as a group composed of one RGB image of size 224*224. Each pixel has 3 values (red, green, blue intensity).
What is the meaning of:
shape=(1, 224, 224, 3)
I mean what are all the values specifying given here for shape?