I use this line of code for looping over my dataset
for batch_idx, (inputs,targets) in enumerate(trainloader)
My dataset is part of imagenet, and I loaded with ImageFolder, but target in here is zero.
Why my labels are not loaded in target?
And here is how I filled it:
train_dataset = datasets.ImageFolder( traindir, transforms.Compose([ transforms.Resize(size=(224, 224)), transforms.RandomHorizontalFlip(), transforms.ToTensor(), normalize, ]))