Solved by ptrblck in post #3 
              
              
                Alternatively to @albanD’s solution, you could also use DatasetFolder, which basically is the underlying class of ImageFolder. 
Using this class you can provide your own files extensions and loader to load the samples. 
def npy_loader(path):
    sample = torch.from_numpy(np.load(path))
    return sa…