1. connect to ssh
2. build/write .bashrc file under home directory (most often, if not maybe under [user]/[user]/)
export PATH=$PATH:/usr/local/eecsapps/cuda/cuda-7.5.18/bin
export LD_LIBRARY_PATH=/usr/local/eecsapps/cuda/cuda-7.5.18/lib64
3. configure .theanorc file to configure the theano parameters like:
[global]
floatX = float32
device = gpu0 4. run python [name].py file.
Tuesday, March 1, 2016
Saturday, February 20, 2016
A complete guide to install Theano and Keras in windows + BLAS libray
The first step:
For my case, to install theano I followed the following link:http://stackoverflow.com/
The second step:
As the Keras is run on top of theano, install the theano is required before installing Keras. To ensure the Keras can run correctly, be sure to install the latest version of Theano. For example, if you meet following error when runing Theano:"max_pool_2d() got an unexpected keyword argument 'mode' "
which means that you are in old version. If you have already installed the old version of Theano, you can update it to the latest version by following command in cmd window:
You can upgrade by typing
pip install -r https://raw.githubusercontent.com/Lasagne/Lasagne/master/requirements.txt
This command uses the 'git', if you didn't install it on window, you can install GIT by following link:
https://git-scm.com/
After your above installation, you need to add its path to the system variable. Following below link to add your path for GIT. There are several different instructions in the thread, please find a correct one for you case.
http://stackoverflow.com/questions/26620312/installing-git-in-path-with-github-client-for-windows
Check your installation for git by ' git --version' in the cmd (Make sure re-open the cmd window to check).
Third step (if needed):
Up to now, you can check you Theano in cmd window by(restart your cmd window first please)
python
import theano
theano.test()
If passed, you are done. If you got following error:
Problem occurred during compilation with the command line below: g++.exe -shared -g -O3 -fno-math-errno -Wno-unused-label -Wno-unused-variable -Wno-write-strings -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mrtm -mhle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -mtune=haswell -D NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -m64 -DMS_WIN64 -IC:\scisoft\WinPython-64bit-3.4.3.7\python-3.4.3.amd64\lib\site-packages\numpy\core\include -IC:\scisoft\WinPython-64bit-3.4.3.7\python-3.4.3.amd64\include -IC:\scisoft\WinPython-64bit-3.4.3.7\python-3.4.3.amd64\lib\site-packages\theano\gof -o C:\Users\Michal\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.4.3-64\tmpgdh7ov2i\mf217e5b3a6b61b4ef70844368439f6cb.pyd C:\Users\Michal\AppData\Local\Theano\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.4.3-64\tmpgdh7ov2i\mod.cpp -LC:\scisoft\WinPython-64bit-3.4.3.7\python-3.4.3.amd64\libs -LC:\scisoft\WinPython-64bit-3.4.3.7\python-3.4.3.amd64 -lpython34
or
Exception: ('The following error happened while compiling the node', CorrMM{valid, (1, 1)}(input.input, Subtensor{::, ::, ::int64, ::int64}.0), '\n', "Compilation failed (return status=1): C:\\Users\\Michal\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-3.4.3-64\\tmpgdh7ov2i\\mod.cpp: In member function 'int {anonymous}::__struct_compiled_op_mf217e5b3a6b61b4ef70844368439f6cb::r
https://www.kaggle.com/c/otto-group-product-classification-challenge/forums/t/13973/a-few-tips-to-install-theano-on-windows-64-bits
and then follow the posts of #13, #15 and #19 in above thread to set the THEANO_FLAG, PATH and modify the path in blas.py.
Now, I believe every thing should be done.
Final step:
If you believe everything is done, it's a better way to close all related windows, like cmd, spyder, ....., then reopen them again to check!!For my case, it works when I reopen spyder. otherwise, it still looks weird.
Thursday, January 28, 2016
Easy way to resolve --- Python 3.5 in win8 (Unable to find vcvarsall.bat)
- pip install numpy
However, If you don’t have a C/C++ compiler installed, you can get the following error while you are trying to install Numpy on Windows 7 or 8.1:
- error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat)
Easiest way to install Numpy is using the (unofficial) binary packages from Christoph’s site.
- Download the binaries from the link below:
- Python 2.7.9+/3.5+ ships with Pip, if you are using Python 2.7.8/3.5 or below install Pip by following the steps as follows:
- Download get-pip.py from the link below and save it as .py:
- Then run the following command from command prompt as administrator:
- python get-pip.py
- Open command prompt and navigate to the directory where pip3.5.exe is located:
- cd C:\Python35\Scripts
- Run the following command and install Numpy (you can copy the downloaded binary to the above directory beforehand or enter the full path to the downloaded file)
- pip3.5.exe install numpy-1.10.4+mkl-cp35-none-win_amd64.whl
Subscribe to:
Posts (Atom)