Code Monkey home page Code Monkey logo

vinn's Introduction

Build Status Coverage Status

ViNN - A modular OpenCL accelerated library for Deep Learning

ViNN is a cross platform MIT-licensed C++ library for training and evaluating artificial neural networks using OpenCL. ViNN parallelizes computationally intensive linear algebra routines using OpenCL, which provides significant performance gains over a single threaded CPU based implementation. Python bindings with NumPy integration ease developing new models and enable interoperability with existing tools and libraries.

The design goals for ViNN are

  • correctness - use gradient checking, static analysis and strive for 100% unit test coverage
  • modularity - for easy integration, extensibility and testing
  • performance - optimize performance critical parts using OpenCL

Features

Linear Algebra

ViNN ships with a CPU/C++ based and an OpenCL based linear algebra backend that supports most common matrix operations needed for neural networks and machine learning applications.

Activation Functions

  • Linear
  • Sigmoid
  • Softmax
  • Hyperbolic Tangent

Cost Functions

  • Squared error
  • Cross entropy

Training

  • Batch gradient descent with early stopping
  • Stochastic/Minibatch gradient descent with early stopping
  • L2 regularization

Result Measurements

  • Confusion table for binary classification
  • Multiclass performance measures (average, micro, macro)

Input/Output Formats

Developing ViNN

Depencies

Integrating with a project:

  • c++ compiler with c++11 support (clang or gcc >= 4.8)
  • OpenCL 1.1 driver and development headers
  • Swig 3

Additional dependencies when building from source:

  • Ruby
  • Python 3, NumPy

Additional dependencies for committers:

  • clang-format
  • lcov

Mac OS X (10.10)

brew install lcov
brew install clang-format
brew install swig

On Ubuntu (15.04)

sudo apt-get install build-essential ocl-icd-libopencl1 opencl-headers ruby

On Debian Wheezy or Raspbian

sudo apt-get install gcc-4.8
sudo apt-get install g++-4.8
sudo apt-get install libgl1-mesa-dev

Building from Source

  1. Create build directory & configure Debug build:

    mkdir build cd build

    On Ubuntu 15 and Mac OS X:

    cmake -DCMAKE_BUILD_TYPE=Debug ..

    On Debian Wheezy or Raspbian

    CC=gcc-4.8 CXX=g++-4.8 cmake -DCMAKE_BUILD_TYPE=Debug ..

  2. Build library and unit tests

    make

  3. Run all tests:

    make test # OR ctest

  4. Run unit tests & generate coverage report

    make coverage

  5. Format source code after making changes:

    make format

  6. Build package

    cpack --config CPackConfig.cmake

  7. Build Python bindings

    Source distribution

    cd build/bindings/python python setup.py sdist pip install --global-option=build_ext --global-option="--swig-opts=-I/Users/ville/projects/vinn/src -c++" dist/vinnpy-0.2.0.tar.gz

    Binary wheel distribution

    cd build/bindings/python python setup.py build_ext --swig-opts="-I/Users/ville/projects/vinn/src -c++" bdist_wheel

vinn's People

Contributors

ville-k avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.