How to load images dataset

I have the image dataset include :

from sklearn.model_selection import train_test_split


train_set_x shape: (12000, 128, 128, 3)
train_set_y shape: (1, 12000)
test_set_x shape: (3000, 128, 128, 3)
test_set_y shape: (1, 3000)

How do I load the images into pytorch for training?

You can make use of Dataset module and further DataLoader module provided by Pytorch for feeding images to your designed network.

1 Like

I found downloaded imagenet and found it painful to figure out to train a model using it…
It would be VERY useful if pytorch people provide an example (or tutorial) just to let us know how should we use imagenet and load the data