Pytorch 常见错误

2020-12-13  本文已影响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
上一篇 下一篇

猜你喜欢

热点阅读