Lesson 06 multicat: Please explain this tensor size

Hi all,
I have a problem with the tensor representing images of a batch.
In code cell 47 of the notebook, I see this:

xb,yb = dls.one_batch()
xb.shape,yb.shape

which results in the following output:

((64, 3, 240, 320), (64, 1, 2))

I get the (64, 1, 2) part for yb.
But for the (64, 3, 240, 320) part for xb, I don’t understand what the “3” represents. I know 64 is the batch size and images are 240x320. What is this “3”?

Thanks!

Should be three channels with RGB values, for images.

Yijin

1 Like

Thanks!