Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Spiking Neural Networks in C++ with strong GPU acceleration through CUDA

License

NotificationsYou must be signed in to change notification settings

tudelft/cuSNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuSNN is a C++ library that enables GPU-accelerated simulations of large-scale Spiking Neural Networks (SNNs).

This project was created for the work"Unsupervised Learning of a Hierarchical Spiking Neural Network for Optical FlowEstimation: From Events to Global Motion Perception" (Paredes-Vallés, F., Scheper, K.Y., and de Croon, G.C.H.E., 2018).

If you use this library in an academic publication, please cite our work:

@article{paredes2020unsupervised,  title={Unsupervised Learning of a Hierarchical Spiking Neural Network for Optical Flow Estimation: From Events to Global Motion Perception},  author={Paredes-Valles, Federico and Scheper, Kirk Yannick Willehm and De Croon, Guido Cornelis Henricus Eugene},  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},  year={2020},  volume={42},  number={8},  pages={2051-2064},  publisher={IEEE}}

More about cuSNN

cuSNN is a library that consists of the following files:

FileDescription
cusnn.cu/.cuhCUDA GPU engine
cusnn_kernels.cu/.cuhCUDA device functions for GPU engine

In cuSNN, a SNN is defined using the following host/device classes:

ClassesContent
NetworkLayer objects and architecture parameters.
Network ->LayerKernel object and layer parameters.
Network -> Layer ->KernelNeural and synaptic parameters.

The cuSNN library has been tested on Linux systems only.

Layer Types

  • Conv2d: 2D convolution over an input neural map composed of several input channels.
  • Conv2dSep: 2D separable convolution over an input neural map composed of several input channels.
  • Pooling: 2D pooling over an input neural map composed of several input channels.
  • Merge: 1x1 convolution with unitary weights over an input neural map composed of several input channels.
  • Dense: Full connectivity to an input neural map composed of several input channels.

Synapse and Neuron Models

At the moment, only the models proposed in our work are implemented. These are:

  • Leaky Integrate-and-Fire (LIF) neuron model
  • Trace-based adaptive LIF neuron model
  • Static synapse model

Learning Rules

At the moment, only the following learning rules are implemented:

Installation

Requirements:

Get the cuSNN source:

git clone https://github.com/fedepare/cuSNN.gitcd cuSNN

Install cuSNN:

Run the following Python script to install the cuSNN library:

python setup.py <install_dir>   # Python 2.*python3 setup.py <install_dir>  # Python 3.*

By default, cuSNN installation directory is/usr/local. Hence, administrative privileges may be required. A differentinstallation directory can be specified using the<install_dir> argument, as indicated above.

To uninstall all files, run:

xargs rm < build/install_manifest.txt

Again, administrative privileges may be required depending on your instllation directory.

cuSNN samples

Several samples are available to demonstrate the main features provided by the cuSNN library. These are stored in thesubmodulecuSNN-samples. To incorporate them to your current directory,run:

git submodule update --init --recursive

P.S.: This process can be a bit slow since a small dataset is included.

Building cuSNN samples

In Linux, the samples are built using makefiles. For this, go to the sample directory you wish and run:

make cleanmake

In the makefile of each sample, there are compilation flags to adapt the simulation to your needs. Depending on theirvalue, some of the following libraries may be required:

  • PLOTTER:OpenGL andFreeGLUT for visualization
  • SNAPSHOT:cnpy library for converting C++ arrays toNumpy

In case your installation directory differs from/usr/local,-lcuSNN needs to be removed fromthe definition of theLIBSUSR* compilation flags, andLIBSCUSTOM needs to be defined as follows:

LIBSCUSTOM = -I<install_dir>/include -L<install_dir>/lib -lcuSNN

Further, if your installation directory differs from/usr/local, you may need to include the installationdirectory to yourLD_LIBRARY_PATH environment variable so the executable can find the library at runtime. You can dothis by adding the following line to your~/.bashrc file:

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:<install_dir>/lib"export LD_LIBRARY_PATH

or by running the following command in every new terminal window in which a cuSNN sample wants to be run:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<install_dir>/lib

Running cuSNN samples

Once the sample of your choice is built as explained above, simply run the executable as follows:

./build/main

The Team

cuSNN is currently maintained byFede Paredes-Vallés,Kirk Scheper, andGuido de Croon.

About

Spiking Neural Networks in C++ with strong GPU acceleration through CUDA

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp