pytorch bug

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.