Coder Social home page Coder Social logo

iq-neuron's Introduction

Integer Quadratic Integrate-and-Fire Neuron

License: MIT

Library for IQIF. A binary libiq for native C++ runtime and shared libraries libiq-network, libiz-network, and liblif-network are included. Please see below for running/installing instructions.

Dependencies

Runtime:

  • OpenMP >= 4.5

  • python3-matplotlib (plotting function)

Buildtime:

  • gcc (C++11)

  • cmake >= 3.9

  • checkinstall (Debian-based packaging)

  • base-devel (Arch-based packaging)

Compile & Install Shared Libraries:

libiq-network.so, libiz-network.so, and liblif-network.so can be used for bridging to python-iqif.

Universal installation

mkdir build && cd build
cmake .. (-DCMAKE_INSTALL_PREFIX=<your preferred directory>)
make -j
sudo make install

Debian-based installation

Instead of sudo make install you can use

sudo checkinstall --pkgname iq-neuron

Uninstall the package with sudo dpkg -r iq-neuron.

Arch-based installation

First download the PKGBUILD, go to the working directory, then

makepkg -si

Uninstall the package with sudo pacman -Rs iq-neuron.

Configuration & Usage

Please see the tutorial first.

You can change the synaptic weights in the Connection Table. The numbers in each lines are pre-synapse neuron index, post-synapse neuron index, weight, time constant respectively.

You can change the neuron parameters in the neuron parameter file. The parameters in each lines are neuron index, rest potential, threshold potential, reset potential, noise strength respectively.

It is recommended to use multithreading only when number of neurons is large (>100 for example).

I also have Izhikevich model and Leaky integrate-and-fire model for comparison. They are already in the shared libs. You need to change the main code to let it work in binary though.

IQIF & Izhikevich performing WTA

Compile & Run

Run the IQIF directly using libiq binary. Use this method if you feel more comfortable with C++ instead of Python.

mkdir build && cd build
cmake ..
make -j
./libiq < ../inputs/session.txt (or use your custom session)
../utils/iq_plot.py

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.