CPU instructions not compiled with TensorFlow

前端 未结 4 1218
南笙
南笙 2020-12-29 15:16

MacBook Air: OSX El Capitan

When I run TensorFlow code in terminal (python 3 tfpractice.py), I get a longer than normal waiting time to get back output

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-29 15:56

    These are warning which mean it may be faster to build tensorflow on your pc from source.

    However if you want to disable them, you may use the code below

    import os
    os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
    import tensorflow as tf
    

    this should silence the warnings. 'TF_CPP_MIN_LOG_LEVEL' represents the Tensorflow environment variable responsible for logging. Also if you are on Ubuntu you may use this code below

    export TF_CPP_MIN_LOG_LEVEL=2 
    

    I hope this helps.

提交回复
热议问题