我曾尝试根据其官方网站上的指南从源代码安装Tensorflow,但这种体验非常不愉快.
无法从源代码安装的直接结果我可以看到如下:
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
Run Code Online (Sandbox Code Playgroud)
我想知道是否有办法"使用SSE4.1指令"和上面提到的其他说明而无需从源代码安装Tensorflow.
谢谢!
如果不从源代码构建TensorFlow,则无法使用SIMD指令.
默认情况下,TensorFlow二进制文件没有进行此优化,以提高与更广泛的CPU架构的兼容性.
如果您想使警告静音,但您可以将其设置TF_CPP_MIN_LOG_LEVEL为2:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
Run Code Online (Sandbox Code Playgroud)
此TF环境变量默认为0,显示所有日志.将其设置为1将过滤INFO日志并2另外使WARNING日志静音.
| 归档时间: |
|
| 查看次数: |
1984 次 |
| 最近记录: |