GithubHelp home page GithubHelp logo

etrommer / agn-approx Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 2.07 MB

Code for the paper "Combining Gradients and Probabilities for Heterogeneours Approximation of Neural Networks"

Home Page: https://etrommer.github.io/agn-approx/

License: GNU General Public License v3.0

Python 100.00%
approximate-computing convolutional-neural-networks energy-efficiency machine-learning neural-networks paper-implementations python pytorch pytorch-lightning science backpropagation-learning-algorithm mlflow statistics

agn-approx's Introduction

AGN Approx Logo

AGN Approx

Code and experiments for the paper Combining Gradients and Probabilities for Heterogeneours Approximation of Neural Networks. agnapprox allows for the study of neural networks using Approximate Multipliers. It's main purpose is to optimize the assignment of different approximate multipliers to the different layers of a Neural Network. By learning a perturbation term for each layer, agnapprox finds out which layers are more or less resilient to small errors in the computations. This information is then used to choose accurate/inaccurate approximate multipliers for each layer. The documentation contains two tutorials on agnapprox' functionality and demonstrates how to optimize a neural network supplied by the user.

Documentation

Detailed Documentation can be found under: https://etrommer.github.io/agn-approx/

Installation

This project is not yet hosted on PyPi. You can install it directly from this repository using pip:

$ pip install git+https://github.com/etrommer/agn-approx.git

Code Formatting & Linting (Development only)

To automatically set up pre-commit, run:

poetry run pre-commit install

Tiny ImageNet 200

Different from CIFAR10 and MNIST which are available through torchvision, the Tiny ImageNet dataset needs to be downloaded manually:

$ cd <your data dir>
$ wget http://cs231n.stanford.edu/tiny-imagenet-200.zip
$ unzip tiny-imagenet-200.zip

The validation images are provided in a flat folder with labels contained in a separate text file. This needs to be changed to a folder structure where each folder is a class containing the respective images. There is a script that handles the conversion:

$ ./src/agnapprox/datamodules/format_tinyimagenet.py --path <your data dir>/tiny-imagenet-200

Usage

  • TODO

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

agnapprox was created by Elias Trommer. It is licensed under the terms of the GNU General Public License v3.0 license.

Credits

  • agnapprox was created with cookiecutter and the py-pkgs-cookiecutter template.
  • This work was created as part of my Ph.D. research at Infineon Technologies Dresden

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.