1. 程式人生 > >win7 64bit 安裝tensorflow 小隨筆

win7 64bit 安裝tensorflow 小隨筆

nbsp win7 con 不同 ces mnist tip win7 64 麻煩

第一次寫博客,主要記錄下安裝深度學習框架(tensorflow),裝好了很簡單(一句話),開始我以為很麻煩,沒有N卡,不知道如何入手。好了,言歸正傳。

我一般喜歡喜歡eclipse的pydev(個人感覺很好用),然後python主要是anconda(清華鏡像),加載tensorflow

1.下載anconda3,百度ancond清華鏡像,下載anconda3-cp35-cp35m-XXXx,下載安裝好,下載eclipse (免安裝),然後配置pydev,與本文無關,這裏不敘述。

2.然後anconda prompt(開始那裏找),輸入conda install tensorflow,輸入Y,等會就安裝好了。

3.測試tensorflow 新建pydev module,擡頭加# -*- coding: utf-8 -*- ,下面輸入import tensorflow as tf,跑下沒問題就安裝成功了。

4.跑下CNN官方mnist數據 ,只能說cpu好慢(6G),等有錢換N卡跑下。

註意:tensorflow升級1.0會出現一些bug ,這裏簡單敘述下解決方式。

1.出AttributeError: module ‘pandas’ has no attribute ‘computation’

辦法:conda update dask

2.AttributeError: ‘module’ object has no attribute ‘mul’

辦法:tf.multiply替代tf.mul

3.AttributeError: ‘module’ object has no attribute ‘sub’

辦法:用tf.subtract替代tf.sub

4.AttributeError: ‘module’ object has no attribute ‘neg’

辦法:用tf.negative替代tf.neg

5.出現一些其他問題可以百度,這裏不列舉。什麽修改全局變量(只是名稱不同)

win7 64bit 安裝tensorflow 小隨筆