Thanks for your reply.
My problem was solved by fixing a bug: I replaced zero by torch.zeros_like() when initializing a tensor.
The num_workers, in my case, was 16 and I did not change it even when the problem was solved. I have tried set it to zero but same problem still happened, therefore I think that problem may be caused by other potential bugs.
ptrblck via PyTorch Forums noreply@discuss.pytorch.org 于2019年4月10日周三 下午4:19写道：