荒廢了好久,又開始拾起theano
因為matlab實在跑很久.....
以下是Window7 32bit 安裝
1. 前置安裝
MingGW 請升級是最新 (4.8.1↑)
GitHub for window
2.python 2.7 32bit 安裝
請安裝 Anaconda
載點: http://continuum.io/downloads
3.使用git 抓 Theano 與 pylearn 2 與 安裝
Theano:
git clone git://github.com/Theano/Theano.git
安裝:
進入 cmd
cd至theano存放的資料夾
指令
python setup.py develop
pylearn2:
git clone git://github.com/lisa-lab/pylearn2.git
安裝:
進入 cmd
cd至pylearn2存放的資料夾
指令
python setup.py develop
4. CUDA 6.5 安裝
載點:
https://developer.nvidia.com/cuda-toolkit-65
當然要有符合的nVIDIA的顯卡才能跑..
5.設定檔
在 C:\[user_name]下加入 .theanorc.txt 其內容
-------無CUDA版------
[global]
openmp=False
[blas]
ldflags=
------有CUDA版-------
[global]
openmp=False
[blas]
ldflags=
[global]
device = gpu
floatX = float32
[nvcc]
flags=-LC:\Anaconda\libs
compiler_bindir=C:\Program Files\Microsoft Visual Studio 11.0\VC\bin (請改成自己的VS版本)
6.環境變數 <- 重要
在PATH此環境變數加入
C:\Anaconda\;C:\Anaconda\Scripts;[你的路徑]\pylearn2\scripts;
新增PYTHONPATH環境變數
加入[你的路徑]\Theano;
新增PYLEARN2_DATA_PATH環境變數
加入 [DATA存放路徑]
新增PYLEARN2_VIEWER_COMMAND環境變數
加入%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen
注意ImageView_Fullscreen 後面還有一個空白
------------------------------------
應該就可以跑PYLEARN2裡的各種測試.py了
沒資料自行下載
在pylearn2\pylearn2\scripts\datasets裡
有各種測資的download script
-----------------------------------