pycharm运行TensorFlow警告:Your CPU supports instructions that this TensorFlow binary was not compiled

转:https://blog.csdn.net/u012556077/article/details/79034383

pycharm运行TensorFlow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to

还有警告如下:The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations.

原始代码如下:

import tensorflow as tf
hello=tf.constant("Hello!")
sess=tf.Session()
print(sess.run(hello))
 
加入如下两行代码,问题解决,警告消失
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

猜你喜欢

转载自blog.csdn.net/qq_34138155/article/details/81140536