Question about batch's shape in chapter 6, image regression

As well as looking at the batch visually, it’s a good idea to also look at the underlying tensors (especially as a student; it will help clarify your understanding of what your model is really seeing).

image
In this case, xb and yb are just variables referring to a mini-batch of the DataLoaders. The book wants me to know what the shape means, and I have already figured out that 64 is the batch size, and (240, 320) is the size of the image.
However, what does the 3 mean? I’m really puzzled.

Oh, I think I know the answer now! The image is rgb colored, so each pixel has three values representing the three colors.

1 Like