GithubHelp home page GithubHelp logo

elefhead / neuromodulated-brc Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 1.0 370 KB

Neuromodulated bistable recurrent cell from https://arxiv.org/abs/2006.05252

Python 51.58% Jupyter Notebook 48.42%
brc rnn rnn-tensorflow rnn-keras gpu nbrc neuromodulated bistable gru tensorflow2 sequential-mnist mnist python recurrent-neural-networks

neuromodulated-brc's Introduction

Neuromodulated Bistable Recurrent Cell

Tensorflow and Keras based implementation of a recurrent cell from RNN layer from A bio-inspired bistable recurrent cell allows for long-lasting memory by Nicolas Vecoven, Damien Ernst and Guillaume Drion.

Usage

To use the library, clone the repo and place bistablernn folder inside your project directory.

The Neuromodulated Bistable Recurrent Cell can be imported as:

from bistablernn import NBRCell

and use the cell to create an RNN layer as per keras API as:

tf.keras.layers.RNN(NBRCell(num_units))

Alternatively, a Neuromodulated Bistable RNN layer can be imported and used as:

from bistablernn import NBR

For example:

model = tf.keras.Sequential([
  NBR(units=num_hidden, input_shape=input_shape),
  tf.keras.layers.Dense(num_classes)
])

An example of training and evaluation using MNIST data is in the notebooks folder.

Dependencies

Notes

  • The Bistable Recurrent Cell modifies the GRU. My code also inherits keras GRUCell and GRU and overloads the functions to reflect the equation changes.
  • The implementation is based on my understanding of the equations and modifications. The authors' implementation can be found here.
  • The option to add dropout and recurrent dropout remain (assuming they work same as on GRU layers) but are untested.

neuromodulated-brc's People

Contributors

elefhead avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

colllin

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.