Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 (python3.6)

输入以下代码,会出现红色提示:

import tensorflow as tf

a=tf.constant([[1.0,2.0]])
b=tf.constant([[3.0],[4.0]])

result=tf.matmul(a,b)
print(result)

with tf.Session() as sess:
    print (sess.run(result))

这里写图片描述

解决方式是在代码最上面加上,即可(python3.6+pycharm)

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

猜你喜欢

转载自blog.csdn.net/sxlsxl119/article/details/81153098