I’m having trouble trying to fine-tune a model.
My main problem is that I cannot verify if the data is being correctly interpreted by the code.
The model will not advance and have a significant result, so I suspect the labels are messed up.
To set the data for training and validation I used the following code found in the Pytorch documentation.(https://pytorch.org/tutorials/beginner/finetuning_torchvision_models_tutorial.html 16)

Create training and validation datasets

image_datasets = {x: datasets.ImageFolder(os.path.join(data_dir, x), data_transforms[x]) for x in [‘train’, ‘val’]}

Create training and validation dataloaders

dataloaders_dict = {x: torch.utils.data.DataLoader(image_datasets[x], batch_size=batch_size, shuffle=True, num_workers=0) for x in [‘train’, ‘val’]}
My data is organized in folders in “./database/train” and “./database/val”.
I’m treating different shoe models in different folders that I’d like to classify.
example of folders: “./database/train/ADIDAS - Yeezy 500 Bone White” and “./database/train/NIKE - OFF WHITE - Air Max 90 Desert Ore”
Where I’ve inserted multiple images of a given category (which is the name of the model).
So my main question is: when I use the torch.utils.data.Dataloader(), is it considering the name of the folder as the label and treating it automatically what is inside the folder? That’s what I thought it would do, given the map-style dataset functionality (https://pytorch.org/docs/stable/data.html#map-style-datasets 32)
Thank you!!