How to load my dataset?

I read the pytorch docs and wrote a simple network.

I don’t understand how to load my data and pass it to the model.

Can you give me a minimal example please ? or any snippet to get started ?

I do not have labels in a particular format yet, so that does not matter much just now.

This data loading tutorial might be a good starter.

What I currently tried is:

from os import path, listdir
from torchvision.io import read_image

for item in listdir("./images/"):
    fullpath = path.join("./images/", item)
    print(fullpath)
    read_image(fullpath)

would this make sense ?

Yes, your code would manually load the data but would not use a Dataset or DataLoader. As described in the tutorial you could use these to e.g. shuffle and batch the data.

Thank you, it looked impossible yesterday but got it done today. Doing it manually reduced the overhead of reading the code (I’m not a python dev.)