美文网首页
Pytorch 常见错误

Pytorch 常见错误

作者: 疯人愿的疯言疯语 | 来源:发表于2020-12-13 10:24 被阅读0次
  1. When using multiprocessing, PyTorch 1.5.1 and 1.5.0 may error out with complaints about incompatibility between MKL and libgomp
Error: Numpy + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp-7c85b1e2.so.1 library.
 Try to import numpy first or set the threading layer accordingly. Set NPY_MKL_FORCE_INTEL to force it.

You can get rid of the error and the error message by setting the environment MKL_THREADING_LAYER=GNU. This can be done either by including the following in your python code:

import os 
os.environ['MKL_THREADING_LAYER'] = 'GNU' 

or by specifying the environment variable when running your script:

MKL_THREADING_LAYER=GNU python my_script.py

相关文章

网友评论

      本文标题:Pytorch 常见错误

      本文链接:https://www.haomeiwen.com/subject/cdvugktx.html