安装好了Tensorflow,运行例子出现如下的错误:
import tensorflow as tf
hello = tf.constant('Hello ,TensorFlow')
sess = tf.Session()
print(sess.run(hello))
出现如下的错误:
import tensorflow as tf
hello = tf.constant('Hello ,TensorFlow')
sess = tf.Session()
print(sess.run(hello))
出现如下的错误:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
解决办法:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
hello = tf.constant('Hello ,TensorFlow')
sess = tf.Session()
print(sess.run(hello))