PyTorch报错insufficient shared memory (shm)

报错

ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm)ERROR: Unexpected bus error encountered in worker. This might be caused by insufficient shared memory (shm)

解决方法

1、在服务器上的docker中运行训练代码时,batch size设置得过大,shared memory不够(因为docker限制了shm).解决方法是,将Dataloader的num_workers设置为0.

2、Docker:Pytorch报错insufficient shared memory (shm)_Felaim的博客-CSDN博客

你可能感兴趣的:(PyTorch,pytorch,深度学习,人工智能)