Yes! I also met a problem when I use numworkers>=2: if I re-index the mini-batch data which fetched by dataloader with numworkers>=2, the data will be in wrong order at times. When I set numworkers=1, everything works well again. I suppose it is because when use multi-workers (multi-processes), pytorch will not provide locks to synchronize the data. In most cases, it will be fine because we just use the data without modify them, but if we want to modify the fetched data, I guess we should use only one process to prevent modify the asynchronous data. I hope this will be helpful to you.