- 运行代码之后控制台除了输出结果之外,还多出一行提示:
(42000, 784)
2018-08-11 01:54:07.395415: 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的日志级别的。
网友评论