环境:
-
Windows 10 x64,
-
Node.js v10,
-
@ tensorflow / tfjs-node v0.1.15
我正在尝试在Node.js上使用tensorflow.js.
我安装了 tfjs-node
,它自动构建成功(node-gyp),但运行时收到以下错误:
tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
Python版本中的类似问题可以在这里找到:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
目前,我不关心性能,所以我只想禁用警告,不要启用AVX / FMA . 在JavaScript中,我该怎么办?
1 回答
在运行之前设置环境变量 .
视窗:
$ set TF_CPP_MIN_LOG_LEVEL=2
Linux的/ MacOS的:
$ export TF_CPP_MIN_LOG_LEVEL=2