For a trainning data images set, should I store it to H5 file or torch.save?

I have a trainning data images set, when I create dataloader, if I read image one by one, it is too slow. I want to in advance read these images and then save them to H5 file or torch.save(). What difference between them?