How to use my own datasets

My previous work is to implement some neural network with PyTorch. The datasets for this network is mnist so it’s very convenient . But when I want to use my own datasets, I met some problems. The datasets is organized by folders. For instance, All the pictures in the folder named A1 belong to the same class called A and all the pictures in the folder named A2. How can I do it? Can anyone help me? Thanks a lot!

Please read the documentation and look for “custom dataset pytorch” in forum. This question has a lot of answers already.

Data Loading Tutorial

Thanks for your reply! I will have a look at the document:laughing:

If you still have any problem, feel free to reply and I’ll send you some examples which I have implemented myself.

Here is the question I asked for the first time I was working with custom Dataset class.
I hope it helps you

1 Like

Thanks again,you a really nice person!

You’re welcome mate. :blush:
Did you solve your problem?