[[ノート/ノート]]~ 訪問者 &counter(); 最終更新 &lastmod();~ *theanoインストール [#q9b2f9e5] ***インストール [#ie016314] 参考=[[Centos6.0上のインストール例:http://deeplearning.net/software/theano/install_centos6.html#install-centos6]] -Python 2.4以上 (2015-04-04 Mintでは Python 2.7) yum install python-devel -OpenSSL-develがないため、pythonでHTTPSが見えないというエラー yum install opensll-devel -BLAS, LAPACK, ATLAS yum install blas-devel lapack-devel atlas-devel -setuptools wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python -pip [[pipのサブコマンドはここ:https://pypi.python.org/pypi/pip]] easy_install pip -NumPy pip install numpy (numpy==1.6.1) -SciPy pip install scipy (scipy==0.10.1) -nose pip install nose -Sphynx pip install sphinx -Git インストール済み -pydot pip install pydot -NVIDIA CUDA drivers and SDK 要求条件に合うかどうかわからないが…~ CUDA用リンクライブラリのパスが必要(通っていなかった)なので[[次の操作:http://www.8wave.net/ldconfig.html]]~ /etc/ld.so.conf.d/下に適当な名前のファイルcuda55-x86_64.confを作ることにする ファイルの内容は、1行で /usr/local/cuda-5.5/targets/x86_64-linux/lib libcublas.soとかlibcufftw.soとかが置いてあるディレクトリ (訂正 2015-04-04 mintでは /usr/local/cuda/lib64 に変更) 作成後、ldconfigを実行 ~ その上で、実行者の環境内で[[次のようなGPUのための環境変数を設定する:http://deeplearning.net/software/theano/install.html#using-the-gpu]] CUDA_ROOT=/usr/local/cuda5.5 か (訂正 2015-04-04 mintでは CUDA_ROOT=/usr/local/cuda-6.0 ) THEANO_FLAGS='cuda.root=/usr/local/cuda5.5' か (訂正 2015-04-04 mintでは CUDA_ROOT=/usr/local/cuda-6.0 ) .theanorcファイルに情報を書き込んでおくか -theano pip install theano ***テスト [#i50da180] -NumPy (~30s): python -c "import numpy; numpy.test()" -SciPy (~1m): python -c "import scipy; scipy.test()" -Theano (~30m): python -c "import theano; theano.test()" -Speed test Theano/BLAS *TheanoとDeep Learning [#s454f625] **とにかくポインタ [#mceb9886] -[[Deep Learning Tutorials:http://deeplearning.net/tutorial/]] -[[Deep Learning Tutorial:http://deeplearning.net/tutorial/deeplearning.pdf]] -[[PythonとDeep Learning. 手書き文字認識:http://www.slideshare.net/mokemokechicken/pythondeep-learning]] -[[Deep Learningを実装する http://deeplearning.net/tutorial:http://www.slideshare.net/tushuhei/121227deep-learning-iitsuka]] -[[Theano: Deep Learning on GPUs with Python:http://biglearn.org/2011/files/papers/biglearn2011_submission_18.pdf]] -[[Deep Learning 用語集:https://staff.aist.go.jp/y-ichisugi/rapid-memo/deep-learning.html]] -[[Theano 解説:http://d.hatena.ne.jp/saket/20121207/1354867911]] - (2014-10-14追記) [[Theano入門(theano_rbm 0.1 ドキュメント):http://www.chino-js.com/ja/tech/theano-rbm/]] **PyLearn2 〜 Theanoを使ったDeep Learning [#b22dc0a9] -[[pylearn2 Tutorial:http://deeplearning.net/software/pylearn2/tutorial/index.html#tutorial]] -[[pylearn2 Document and Installation:http://deeplearning.net/software/pylearn2/#download-and-installation]] -[[ここでも紹介:http://www.slideshare.net/yurieoka37/ss-28152060]] gitが必要。なければ yum install git pylearn2をダウンロード git clone git://github.com/lisa-lab/pylearn2.git インストール cd <pylearn2home>/pylearn2/ su python setup.py develop ついでに export PYLEARN2_DATA_PATH=/data/lisa/data 次にチュートリアル [[Quick-start example:http://deeplearning.net/software/pylearn2/tutorial/index.html#tutorial]] に従って試す。まずcifer-10(cs.toronto.eduのデータ、[[ここ:http://www.cs.toronto.edu/~kriz/cifar.html]]に説明)をダウンロード cd <pylearn2home>/pylearn2/scripts/datasets ./download_cifer10.sh しばらくかかる 次に、モデルをtrainする <pylearn2home>/pylearn2/scripts/tutorials/grbm_smd/ python make_dataset.py export PATH=$PATH:<pylearn2home>/pylearn2/scripts .bashrcに入れておくとよい train.py cifar_grbm_smd.yaml 次にモデルを見てみる。その前に、matplotlibを使うので、それをインストール。その前に sudo yum install freetype-devel libpng-devel pip install matplotlib 更に表示のためにeogが欲しいので yum install eog-devel その上で export PYLEARN2_VIEWER_COMMAND="eog --new-instance" show_weights.py cifar_grbm_smd.pkl << Xwindowなりのディスプレイ環境が必要、teraterm下ではエラーになる その結果表示されたものが~ &ref(cifar_grbm_smd-show_weight.png); 更に plot_monitor.py cifar_grbm_smd.pkl << サブコマンドの使い方が分からない ------------------------------------------------------- Deep Learning Tutorial の Theano例題をやってみた >> [[Deep Learning Tutorialの例題:ノート/Deep Learning Tutorialの例題をやってみた]] Deep Learning Tutorial の Theano例題をやってみた >> [[Deep Learning Tutorialの例題>ノート/Deep Learning Tutorialの例題をやってみた]]