I am unable to spilt my dataset as it contains 46 classes. I tried the approach of assignment 3 but was not helpful. Link to my notebook:https://jovian.ai/shobhit-tya/assignment-4-project
- Remove kaggle key details from your notebook. These things should be private, or someone will be able to access kaggle features as you.
- You use
ImageFolder
two times, for train and validation set. You should use it only once and then userandom_split
. - You’ve missed some function name below
- Not sure if
RandomCrop
transform is good for this task. The regions randomly selected seem to contain a single color sometimes. You should useResize
.
- Can you show me any example to show how to use ImageFolder and then randomsplit?
Written without checking:
dataset = ImageFolder(path, transform=transforms)
train_ds, val_ds, test_ds = random_split(dataset, [train_count, val_count, test_count])
The train_count
, val_count
and test_count
of course depends on how you want to split the dataset.