Giter Club home page Giter Club logo

bnn's Introduction

BNN

Build Status Join the chat at https://gitter.im/codezoned2017/Lobby contributions welcome

About

A simple, light weight deep learning framework with a specialisation aimed for Binarized Neural Networks. This project aims to overcome some problems with existing deep learning frameworks without compromising performance, like most of the time they are quite heavy, come with a lot of dependencies, require innumerable extra packages for accelerated computing. This project will just depend on CUDA C for NVIDIA GPUs. In future, support may be added for Intel GPUs.

Technologies

We are using the following technologies in our project,

  1. C++
  2. Python
  3. CUDA C
  4. Google Test
  5. Boost.Python

How to contribute?

Follow the steps given below,

  1. Fork, https://github.com/codezonediitj/BNN
  2. Execute, git clone https://github.com/codezonediitj/BNN/
  3. Change your working directory to ../BNN.
  4. Execute, git remote add origin_user https://github.com/<your-github-username>/BNN/
  5. Execute, git checkout -b <your-new-branch-for-working>.
  6. Make changes to the code.
  7. Add your name and email to the AUTHORS, if you wish to.
  8. Execute, git add ..
  9. Execute, git commit -m "your-commit-message".
  10. Execute, git push origin_user <your-current-branch>.
  11. Make a PR.

That's it, 10 easy steps for your first contribution. For future contributions just follow steps 5 to 10. Make sure that before starting work, always checkout to master and pull the recent changes using the remote origin and then start following steps 5 to 10.

See you soon with your first PR.

Guidelines

We recommend you to introduce yourself on our gitter channel. You can include the literature you have studied relevant to Binarized Neural Networks, some projects, prior experience with the technologies mentioned above, in your introduction.

Please follow the rules and guidelines given below,

  1. For Python we follow the numpydoc docstring guide.
  2. For C++ we follow our own coding style mentioned which is yet to be finalised.
  3. For C++ documentation we follow, Doxygen style guide. Refer to various modules in the existing master branch for the pattern.
  4. Follow the Pull Request policy given here. All changes are made through Pull Requests, no direct commits to the master branch.

Keep contributing!!

bnn's People

Contributors

czgdp1807 avatar inderpreetsingh01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bnn's Issues

Possible memory leak in forward mode AD

Description of the problem

With multiple variables, when the gradient is overwritten for the next variable the previous gradient pointer should be cleared from heap memory. Currently, it leads to a memory leak.

Example of the problem

References/Other comments

Tensor API proposal

Description of the problem

This issue aims to discuss and result in a stable API for Tensors. Taking references from already exisiting Tensor in tensorflow and torch is required.

Example of the problem

References/Other comments

Number of threads in forward_impl.cpp

Description of the problem

  • using layer->len_ops number of threads may cause an issue for a neural network where the input dimension is high.
  • Threads need not be passed to _rr_scheduler in the present implementation.
    while(layer != NULL)
    {
    unsigned threads = layer->len_ops, i;
    thread* pool[threads];
    op_queue<data_type>* jobs[threads][2];
    _rr_scheduler<data_type>(layer, jobs, threads);

Example of the problem

References/Other comments

Design Discussions

Description of the problem

This issue aims at specifying the workflow and discussing the design of the framework for BNN.

Workflow

  1. Modules - The modules that should be a part of the framework(in this issue).
  2. APIs for each module finalised above(in separate issues).
  3. Class/Function design for each of the above APIs.
  4. Implementation in a PR.
  5. Testing.

If you have anything to suggest about the modules and their organization then please comment below.

Example of the problem

References/Other comments

Model API

Description of the problem

APIs for models(train, test) need to be discussed in the issue. A simple use case for starting,
Image classification on MNIST dataset with 784-200-200-10.

Example of the problem

References/Other comments

Removing unnecessary lines from .travis.yml and fixing CMakeLists.txt

Description of the problem

  1. The following line is not needed,

    - ls -a

  2. The following should use 1.10.0 release,

    BNN/CMakeLists.txt

    Lines 23 to 31 in d21065c

    if(INSTALL_GOOGLETEST AND BUILD_TESTS)
    include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
    ExternalProject_Add(googletest
    GIT_REPOSITORY https://github.com/google/googletest
    GIT_TAG master
    SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
    BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
    TEST_COMMAND "")
    endif()

Example of the problem

References/Other comments

Automatic Differentiation Design and Implementation

Description of the problem

This issue aims at discussing design of automatic differentiation(AD).
Basically, AD has two modes, Forward Mode and Reverse Mode. We plan to implement both of them as they have their own pros and cons.
In the context of this project, the function to be differentiated will be loss function whose variables will be the weights of the network. All of the quantities i.e., weights, inputs and output will be tensors.

Forward Mode
This mode computes the derivative alongside computing the value of the loss function. For each variable under consideration a derivative component is associated with it. Then chain rule is applied in each step of the computation.

Reverse Mode
This is similar to back propagation. Here the computation graph is formed in the forward pass and the derivative of the loss function w.r.t all the variables is calculated in reverse pass.

Example of the problem

References/Other comments

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.