How do you divide your dataset given each class is in one folder

My folder structure looks like this

│ │ image1.jpg
│ │ image2.jpg
│ │ image1.jpg
│ │ image2.jpg
│ │ image1.jpg
│ │ image2.jpg

Now I wish to divide my dataset into train and validations sets inorder to work on it with FastAI how do you suggest I do that? thanks!

Hi @Khalifa1997 ,
Can you please share how you intend to divide your data set?

But,nevertheless, you can still use


if you wish to split it by random. If you wish to split it in some other way, you may have to write some code to organize your data first.
All the best

Just adding this link to the datablock documentation. If you scroll down to from_folder you should find the setup you are looking for.