Incorrect data using h5py with DataLoader?

I believe it’s a known issue with HDF5 / h5py that it doesn’t play well with multiprocessing.
https://groups.google.com/forum/#!topic/h5py/bJVtWdFtZQM

What you can do is (python 3 only) at the top of your main script, add the lines:

import torch
import torch.multiprocessing
torch.multiprocessing.set_start_method('spawn')
1 Like