Pytorch:RuntimeError: DataLoader worker (pid 27) is killed by signal: Killed. Details are lost due

问题描述:
在Docker中运行Pytorch,并且DataLoader采用了多进程(num_workers>0),当内存不足时报错如下:

RuntimeError: DataLoader worker (pid 27) is killed by signal: Killed. Details are lost due to multiprocessing. Rerunning with num_workers=0 may give better error trace.

在这里插入图片描述

看这提示完全不知道是因为OOM啊,特地发出来供大家参考,如有帮助请点赞。

参考:

  1. https://github.com/pytorch/pytorch/issues/2244
  2. https://blog.csdn.net/songyu0120/article/details/85156105

你可能感兴趣的:(PyTorch,PyTorch学习笔记)