在使用pytorch构建网络时, 执行model.cuda()时, 出现标题上的错误, 还会报如下错误 :
RuntimeError: cuda runtime error (30) : unknown error at /opt/conda/conda-bld/pytorch_1544199946412/work/aten/src/THC/THCGeneral.cpp:51
目前网上的解决办法是重新安装显卡(不一定行), 短期办法是重启电脑(以后仍会出现该问题).
在网上找了很多方法, 下面是一些解决方案 :
https://discuss.pytorch.org/t/resolved-cuda-runtime-error-30/1116
https://github.com/milesial/Pytorch-UNet/issues/8
https://discuss.pytorch.org/t/runtimeerror-cuda-runtime-error-30-unknown-error/10100/3
https://discuss.pytorch.org/t/resolved-cuda-runtime-error-30/1116
https://github.com/pytorch/pytorch/issues/4293 (Zombie process when use GPU)