-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Hi all the high-level engineers!
I am very new to pytorch and even to pythone.
Nonetheless, I am trying to understand pytorch by the documentation of the tutorial of pytorch.
Now I am going through TRAINING A CLASSIFIER using dataset, CIFAR10.
Code Link: https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html
In the code, there is the lines as follows;
for i, data in enumerate(trainloader, 0):
inputs, labels=data
I have checked the size of data[0] and input[0], and they are different and it was [4, 3, 32, 32] and [3, 32, 32] respectively.
I understand that data[0] has the size of [4, 3, 32, 32] as it is the first batch that contains 4 images.
Question
-
But why is the size of input[0] [3, 32, 32]? As I checked, input[0] is the first image of the data[0].
Why is input[0] only taking the first image of data[0]? According to the code, input[0]=data[0], shouldn't it ? -
According to the tutorial, "data is a list of [inputs, labels]". But I don't see labels[0] value in data[0].
Why is so?
Sorry if it is too basic, but please help.