import torchvision.transforms as transforms
from torchvision import datasets


transforms = transforms.Compose([transforms.RandomRotation(30),
transforms.Resize(30),
transforms.ToTensor(),
transforms.Normalize((0.5,0.5,0.5),(0.5,0.5,0.5))])


Arabic_train_data = datasets.ImageFolder(Arabic_train_dataPath, transform = transforms)
Arabic_test_data = datasets.ImageFolder(Arabic_test_dataPath, transform = transforms)

here is the code I’ve used, the data path has 10 folders of arabic handwritten numbers each folder contain 6000 bmp image file