Solved by Andres_Asensio_Ramos in post #3 
              
              
                In my experience, I would first build an HDF5 file with all your images, which you can build easily following the documentation of h5py on http://docs.h5py.org/en/latest/. During training, build a class inheriting from Dataset which returns your images. Something along this line: 
class dataset_h5(t…