Hint in Forward Pass, convolutional Model step by step week 1

Hello,
There is a hint in Convolutional Neural Networks - Forward Pass .
To select a 2x2 slice at the upper left corner of a matrix “a_prev” (shape (5,5,3)), you would do:
a_slice_prev = a_prev[0:2,0:2,:]

and i think the right form to use in python is:

a_slice_prev = a_prev[:,0:2,0:2]

Hi Mohamad_AbdulRahman,

It seems to me a matter of convention. In principle, either approach can be taken as long as it fits the structure of the data flowing through the network.

It seems to me a matter of convention. In principle, either approach can be taken as long as it fits the structure of the data flowing through the network.

Yes, in this case a_prev has dimensions (height, width, channel). The selection in the example is made only on the height and the width, thus keeping all the channels.

Thank you reinoudbosch and cmarquay for reply