运行tensorflow代码时 ,出现警告:The TensorFlow library wasn't compiled to use SSE instructions, ……解决办法

在运行tensorflow代码时  ,出现警告:

The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.

 

翻译:

你的机器是支持使用SSE指令的,使用SSE可以加速你的CPU计算。但是,你的Tensorflow库没有编译,所以用不了

 

 

解决办法:

在代码段里引入:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' 

 

原因:

我是使用"pip install tensorflow" 这种方法安装的Tensorflow,而不是从源码编译安装的。

这只是个警告,只是影响cpu计算速度而已。使用或者不使用SSE你的程序都是可以运行的。

你可能感兴趣的:(tensorflow)