pytorch bug

   

  1. ImportError: torch.utils.ffi is deprecated

      raise ImportError(“torch.utils.ffi is deprecated. Please use cpp extensions instead.”)
    ImportError: torch.utils.ffi is deprecated. Please use cpp extensions instead.

缺ciff包,用pip install cffi,如果安装后还是报错,这是你该果断降低pytorch版本到0.4,原因在pytorch1.0不支持此包

 

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

 

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

 
    原文作者:pytorch
    原文地址: https://www.cnblogs.com/walktosee/p/10580604.html
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞