首页 文章

TensorFlow.js:如何避免`你的CPU支持指令...... AVX AVX2`?

提问于
浏览
2

环境:

  • 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 回答

  • 2

    在运行之前设置环境变量 .

    视窗:

    $ set TF_CPP_MIN_LOG_LEVEL=2

    Linux的/ MacOS的:

    $ export TF_CPP_MIN_LOG_LEVEL=2

相关问题