python wrapper for DeepCL deep convolutional neural network library for OpenCL
Project description
DeepCL Python wrappers
Python wrapper for DeepCL
To install from pip
pip install DeepCL
related pypi page: https://pypi.python.org/pypi/DeepCL
How to use
See test_deepcl.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
For example of using q-learning, see test_qlearning.py.
To build from source
Pre-requisites:
on Windows:
Python 2.7 or Python 3.4
A compiler:
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
on linux:
Python 2.7 or Python 3.4
g++, supporting c++0x, eg 4.4 or higher
To build:
cd python
python setup.py build_ext -i
Then, you can run from this directory, by making sure to add it to the path, eg:
PYTHONPATH=. python test_lowlevel.py /my/mnist/data/dir
To install:
cd python
python setup.py install
Notes on how the wrapper works
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
to run unit-tests
From the python directory:
nosetests -sv
Development builds
If you want to modify the sourcecode, you’ll need to re-run cython, so you’ll need cython:
pip install cython
If you want to update this readme, you might want to re-generate the README.rst, so you’ll need pypandoc:
pip install pypandoc
(note that pypandoc depends on pandoc)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for DeepCL-5.8.1-py3.4-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 089dd4f2766bcb9f6db54a8186b6248c593d88b1805056958a0e0f4427f8a2fa |
|
MD5 | ce8fbaeec94f64a5e44ed08a1da3b1ad |
|
BLAKE2b-256 | 22c1aa4c7232471e2267e5a78ef7b459e9ecc93d14d580dc2fbbe219213996f7 |
Hashes for DeepCL-5.8.1-py2.7-win-amd64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a6d6284b73dc6a567e0e040b8678f415c24d2857e20a90764b87686cb1e904d |
|
MD5 | 295b0ef8fd6750554c65eea3c211355e |
|
BLAKE2b-256 | 1697076d25816580e8bee587ab99c94f0c0050150cce54e60688458f23e3a24e |