美文网首页TensorFlow技术帖我爱编程
TensorFlow学习:windows平台下TensorFlo

TensorFlow学习:windows平台下TensorFlo

作者: 暖倾心 | 来源:发表于2017-12-21 16:02 被阅读27次

    参考:

    blog.csdn.net/hola_f/article/details/70482300


    1、事先下载好PYTHON

    2、打开cmd,输入Python,出现Python的版本信息就说明Python安装成功了

    3、安装TensorFlow

    我装的是cpu版本的TensorFlow

    以管理员方式打开CMD,运行以下代码,进行一键安装:

    pip install --upgrade --ignore-installed tensorflow

    4、测试TensorFlow是否安装成功

    在cmd输入如下代码:

    python

    importtensorflow as tf

    hello=tf.constant("Hello!")

    sess=tf.Session()

    print(sess.run(hello))

    程序输出 Hello! 则表示TensorFlow安装成功。

    5、出现错误Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

    # Just disables the warning, doesn't enable AVX/FMA

    import os

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

    执行上方代码忽略即可!!!

    相关文章

      网友评论

        本文标题:TensorFlow学习:windows平台下TensorFlo

        本文链接:https://www.haomeiwen.com/subject/tqtwwxtx.html