Image Shape Confusion

Why does the shape of image[0] in the video is 28x28 while Aakash mentions that the size of each image is [1x28x28] ?

This is a shape you will want to implement when training model or passing image of inference [channels x height x width] even if the number of channels is 1 (that is your images are black and white). Pay attention beforehand he specifies image as one sample that is one picture with shape [1, 28, 28] and when image[0] he is accessing the first and the only channel in the image with size [28, 28].

1 Like