I am trying to use the ImageFolder class to read a bunch of images which are arranged this way:
0(folder)
    image01
    image01

1(folder)
    image01
    image01

2(folder)
    image01
    image01

Then I do something lilke:
    ds = torchvision.datasets.ImageFolder(  root=path_to, transform=p   )
I can see the list of classes through:
list_of_classes=list(map(int, list(ds.classes))  )
Now reading through the docs, I iterate through the sample and targets lke so:
for idx, (sample, target) in enumerate(ds):
    print(sample, target)

For some reason, I notice that the target is showing the indices of ds.classes rather than the target value itself.
Is this the intended behaviour? I was expecting it to simply show me the classes (0,1,2) in this case.