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.

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM