# DataLoader with h5py

**URL:** <https://discuss.pytorch.org/t/dataloader-with-h5py/6773>\
**Category:** Uncategorized\
**Created:** [August 27, 2017, 2:25pm UTC](https://discuss.pytorch.org/t/dataloader-with-h5py/6773 "2017-08-27T14:25:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yikang-li](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/yikang-li/32/9558_2.png) [@yikang-li](https://discuss.pytorch.org/u/yikang-li)\
**Post date:** [August 27, 2017, 2:25pm UTC](https://discuss.pytorch.org/t/dataloader-with-h5py/6773/1 "2017-08-27T14:25:05Z")

</div>

Hi,

Recently, I encounter some problem with data loading. That is, when I utilizing DataLoader with more than 1 workers to load HDF5 file with h5py, the retrieved data usually appears random-like. I have turn off the `shuffle` and use the default `sampler` and `collate_fn`. The problem may come from `h5py`.

I wonder if there is any solution to such problem.

Best,  
Yikang

---

<div class="post-metadata">

**Author:** ![QuantScientist](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/quantscientist/32/1393_2.png) [@QuantScientist](https://discuss.pytorch.org/u/QuantScientist)\
**Post date:** [August 27, 2017, 6:03pm UTC](https://discuss.pytorch.org/t/dataloader-with-h5py/6773/2 "2017-08-27T18:03:31Z")

</div>

Where is your code …?

---

<div class="post-metadata">

**Author:** ![Jesse\_Wang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jesse_wang/32/14027_2.png) [@Jesse\_Wang](https://discuss.pytorch.org/u/Jesse_Wang)\
**Post date:** [July 12, 2019, 6:28am UTC](https://discuss.pytorch.org/t/dataloader-with-h5py/6773/3 "2019-07-12T06:28:27Z")

</div>

Same problem. 😰

---

<div class="post-metadata">

**Author:** ![platero](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/platero/32/352_2.png) [@platero](https://discuss.pytorch.org/u/platero)\
**Post date:** [September 19, 2019, 5:40pm UTC](https://discuss.pytorch.org/t/dataloader-with-h5py/6773/4 "2019-09-19T17:40:00Z")

</div>

See [DataLoader, when num\_worker \>0, there is bug](https://discuss.pytorch.org/t/dataloader-when-num-worker-0-there-is-bug/25643/16)
