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