Solved by Kushaj in post #2 
              
              
                In case you want them to be a part of dataloader, then you can use ImageFolder. 
But if you want to load them to memory, the most efficient way would be to 
import os
import matplotlib.pyplot as plt
path = 'data/img/'
img_names = os.listdir(path)

images = np.empty(num_images, width, height, channel…