How do you use custom dataset with Pytorch?

I am trying to use a custom dataset with Pytorch and iterating with torch.utils.data.DataLoader but am not able to get this to work. Has anyone have any experience with this?

The easiest approach is with ImageFolder, which works basically the same as keras: https://github.com/pytorch/vision#imagefolder

2 Likes