Slow training using HDF5 dataset

Hi, I am training my model using HDF5 dataset (containing ~8000 images) (size:256x256). I switched to using HDF5 due to slow training speed, however, I did not notice any speed-gains. It takes 20 minutes with plain dataloader for one epoch :confused: and it takes same amount of time using HDF5. I am not understanding where I could be going wrong. I have experience using tfrecords and I remember training models quite fastly on tensorflow.