美文网首页我爱编程
TensorFlow-1-安装

TensorFlow-1-安装

作者: MangoDai | 来源:发表于2017-09-16 11:00 被阅读0次

    安装

    全局采用Python3.5

    1. Anaconda安装

      1. 下载对应版本
      2. 安装
      3. 替换仓库
        conda config --add channels         https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
        conda config --set show_channel_urls yes
        
    2. TensorFlow安装

      C:> conda create -n tensorflow python=3.5
      C:> activate tensorflow
      // 二选一 GPU需要算力3.0以上且安装对应8.0套件,一般来说游戏本才可以。
      C:> pip install --ignore-installed --upgrade tensorflow // CPU 
      C:> pip install --ignore-installed --upgrade tensorflow-gpu // GPU
      
    3. 测试

      >>> import tensorflow as tf
      >>> hello = tf.constant('Hello, TensorFlow!')
      >>> sess = tf.Session()
      >>> print(sess.run(hello))
      

    相关文章

      网友评论

        本文标题:TensorFlow-1-安装

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