运行代码之后,控制台除了输出应该有的结果外,还多了一行:
I T:\src\github\tensorflow\tensorflow\core\platform\cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
就是说您当前的CPU可以支持未编译为二进制的指令AVX2
要想消除该提示,需要在代码中添加两行代码:

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

查阅有得知,这行代码是用于设置TensorFlow的日志级别的。