如何解决这些tensorflow警告?

2024-06-12 00:48:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我刚刚用pip安装了Tensorflow 1.0.0。跑步时,我会收到如下警告。

W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.

对于SSE4.1,SSE4.2,AVX,AVX2,FMA,我得到了5个类似的警告。

尽管有这些警告,程序似乎运行良好。


Tags: pipthecore警告tensorflowlibrarycpu跑步
3条回答

export TF_CPP_MIN_LOG_LEVEL=2 solved the problem for me on Ubuntu.

https://github.com/tensorflow/tensorflow/issues/7778

我不太了解C,但我发现了这个

bazel build --linkopt='-lrt' -c opt --copt=-mavx --copt=-msse4.2 --copt=-msse4.1 --copt=-msse3-k //tensorflow/tools/pip_package:build_pip_package

你如何建立你的程序?

我提出的解决问题的方法是:

#!/usr/bin/env python3
import os
import tensorflow as tf
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

至少可以在任何Debian或Ubuntu系统上运行。

相关问题 更多 >