TensorFlow: Your CPU supports instructions that this TensorFlow binary was not compiled to use

深度学习TensorFlow 561

如果你运行TensorFlow出现了以下提示

2018-05-02 13:58:36.608794: 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
2018-05-02 13:58:36.845308: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1356] Found device 0 with properties:
name: GeForce GTX 660 major: 3 minor: 0 memoryClockRate(GHz): 1.0975
pciBusID: 0000:01:00.0
totalMemory: 2.00GiB freeMemory: 1.65GiB
2018-05-02 13:58:36.851020: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1435] Adding visible gpu devices: 0
2018-05-02 13:58:37.134451: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:923] Device interconnect StreamExecutor with strength 1 edge matrix:
2018-05-02 13:58:37.136802: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:929]      0
2018-05-02 13:58:37.138778: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:942] 0:   N
2018-05-02 13:58:37.140556: I T:\src\github\tensorflow\tensorflow\core\common_runtime\gpu\gpu_device.cc:1053] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 681 MB memory) -> physical GPU (device: 0, name: GeForce GTX 660, pci bus id: 0000:01:00.0, compute capability: 3.0)

别慌,这不是错误,但是如何除去这个提示呢?

我们设置一下log等级就可以解决这个问题,在文件的顶部加上

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

Read Comments

  • 00004 years ago0

    It looks like you've misspelled the word "cron" on your website. I thought you would like to know :). Silly mistakes can ruin your site's credibility. I've used a tool called SpellScan.com in the past to keep mistakes off of my website.

    -Kerri

    • Julian4 years ago0

      人肉广告,你真牛。
      想想你也不容易,暂且给你留着吧

Post Comment