Code Monkey home page Code Monkey logo

eprop-jax's Introduction

eprop-jax

A JAX re-implementation of e-prop algorithm. eprop-jax is written to be simple, clean and fast. I tried to replicate the pattern generation task in eprop/dataset.py, as described in the paper. And the implementation eprop/model.py includes only Leaky Integrate-and-Fire (LIF) neurons.

Example Usage

Since the implementation is JIT compiled, I suggest doing experimentation/modifications on a Jupyter notebook e.g. regression_task.ipynb, to avoid XLA compilation at every run.

It's just enough to run python eprop/train.py to test the network with default hyperparameters.

$ python eprop/train.py
Epoch: [0/100] - MSE Loss: 0.3905
Epoch: [10/100] - MSE Loss: 0.2088
Epoch: [20/100] - MSE Loss: 0.0821
Epoch: [30/100] - MSE Loss: 0.0395
Epoch: [40/100] - MSE Loss: 0.0307
Epoch: [50/100] - MSE Loss: 0.0265
Epoch: [60/100] - MSE Loss: 0.0187
Epoch: [70/100] - MSE Loss: 0.0221
Epoch: [80/100] - MSE Loss: 0.0173
Epoch: [90/100] - MSE Loss: 0.0217

Acknowledgement

This code is inspired from the PyTorch implementation of e-prop by Charlotte Frenkel.

License

MIT

eprop-jax's People

Contributors

yigitdemirag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.