Win 7+Anaconda+tensorflow


Anaconda是一種擁有各種Python庫的集成環境,也支持Windows、Mac和Linux系統。

1、安裝 Anaconda

  安裝包:https://www.continuum.io/downloads。注意版本問題,我用的是64位系統。且目前Windows版本的TensorFlow只支持Python3.5以上。

2、安裝 TensorFlow    

  打開 Anaconda Prompt,建立名為 tensorflow的 conda計算環境,輸入:
    conda create -n tensorflow python=3.5  
  安裝完以后,激活 tensorflow 環境,輸入:
    
    activate tensorflow
 
  激活后,我選擇安裝的是 CPU版本,輸入:

3、測試

  1. python  
  2. >>import tensorflow as tf  
  3. >>hello = tf.constant('Hello, Tensorflow!')  
  4. >>sess = tf.Session()  
  5. >>print(sess.run(hello))  
  6. >>a = tf.constant(10)  
  7. >>b = tf.constant(22)  
  8. >>print(sess.run(a+b))

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM