Table of Contents generated with DocToc
- PyDeepCL
- How to use
- Notes on how the wrapper works
- To install from pip
- To build directly
- Considerations for Python wrapper developers
Python wrapper for DeepCL
See test_clconvolve.py for an example of:
- creating a network, with several layers
- loading mnist data
- training the network using a higher-level interface (
NetLearner
)
For examples of using lower-level entrypoints, see test_lowlevel.py:
- creating layers directly
- running epochs and forward/backprop directly
- cDeepCL.pxd contains the definitions of the underlying DeepCL c++ libraries classes
- PyDeepCL.pyx contains Cython wrapper classes around the underlying c++ classes
- setup.py is a setup file for compiling the
PyDeepCL.pyx
Cython file
pip install DeepCL
- related pypi page: https://pypi.python.org/pypi/DeepCL
- on Windows:
- Python 2.7 build: need Visual Studio 2008 for Python 2.7 from Microsoft
- Python 3.4 build: need Visual Studio 2010, eg Visual C++ 2010 Express
- Need the following python packages installed, eg via
pip install
:- cython
cd python
python setup.py build_ext -i
- By default, cython disables ctrl-c, so need to handle this ourselves somehow, eg see
NetLearner.learn
for an example - To handle ctrl-c, we need to use
nogil
, which means we cant use theexcept +
syntax, I think, hence need to handle this ourselves too :-) see again `Netlearner.learn for an example