Installation¶
Quick start¶
Install the package via:
pip install hessianfree
To make sure things are working, open a python interpreter and enter:
import hessianfree as hf
hf.demos.xor()
A simple xor training example will run, at the end of which it will display the target and actual outputs from the network.
Developer install¶
Use this if you want to track the latest changes from the repository:
git clone https://github.com/drasmuss/hessianfree.git
cd hessianfree
python setup.py develop --user
Requirements¶
- python 2.7 or 3.5
- numpy 1.9.2
- matplotlib 1.3.1
- optional: scipy 0.15.1, pycuda 2015.1.3, scikit-cuda 0.5.1, pytest 2.7.0
Installing PyCUDA on Windows¶
Steps to install PyCuda on Win7/10 64bit (as of Feb. 2016)
Assumes default installation locations, adjust as appropriate.
Install
python
,numpy
Install Visual Studio Express 2013 for Desktop (https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx)
Go to
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin
- Rename the
x86_amd64
folder toamd64
- Rename the
Go into the
amd64
folder- Rename
vcvarsx86_amd64.bat
tovcvars64.bat
- Rename
Add the following to system path:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;
Install CUDA (http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-microsoft-windows/#axzz3RTeEcNTV)
- ignore warning about not finding visual studio
Go to
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin
- open
nvcc.profile
- change the line starting with INCLUDES to:
INCLUDES += "-I$(TOP)/include" "-I$(TOP)/include/cudart" "-IC:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/include" $(_SPACE_)
- open
Install PyCUDA
- download .whl file from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pycuda
pip install <filename>