First, thanks for the answer! Second: yes, the error was exactly that, now it’s working with np.dtype(“Float32”). Unfortunately, I cannot use this ImageFolder, I have access only to the hdf5 file with the images in numpy arrays