python
pip install theano
python
pip install pillow
pip install PyYAML
pip install IPython
pip install Cython
git clone git://github.com/lisa-lab/pylearn2.git
python setup.py develop
python
ImportError: No module named numpy
python
===============================
00001 #include <Python.h>
00002 #include "structmember.h"
00003 #include <sys/time.h>
~~~~~~~~~Abbreviation~~~~~~~~~
Exception: Compilation failed (return status=1): /Users/user-name/.theano/compiledir_Darwin-14.5.0-x86_64-i386-64bit-i386-2.7.8-64/lazylinker_ext/mod.cpp:1:10: fatal error: 'Python.h' file not found. #include <Python.h>. ^. 1 error generated..
Run img2csv.py on the site
If you are told that the Image module cannot be found, change the 2nd to 4th lines to the following
from PIL import Image
from PIL import ImageOps
from PIL import ImageFilter
Execute the following command as per the site
python img2csv.py grayscale converted.jpg list train.csv
I couldn't pass the list well here, so read the code and run it below
python img2csv.py "../img/*.jpg " train.csv
Put hoge_dataset.py for your site in pylearn2 / datasets /
Set the following in the environment variables
export PYLEARN2_DATA_PATH = the path where train.csv and grbm.yaml are located * export PYLEARN2_VIEWER_COMMAND="open -Wn"
Learn
```command:
train.py grbm.yaml
```
Display command
```command:
show_weights.py grbm.pkl
```
I got the following error when displaying the learning result
UserWarning: Unable to import matplotlib. Some features unavailable. Original exception: No module named matplotlib.pyplot "Original exception: " + str(matplotlib_exception)) ```
Add matplotlib with the following command and check the operation safely
pip install matplotlib
http://kensuke-mi.xyz/kensuke-mi_diary/2014/11/rbma.html http://d.hatena.ne.jp/aremokoremo/20140507/1399475248
Recommended Posts