Code Monkey home page Code Monkey logo

stbp-for-training-spikingnn's Introduction

Spatio-temporal BP for spiking neural networks.

Matlab version of convolutional SNN on MNSIT[1].

Please find another branch for Pytorch version on CIFAR10[2].

For neurmorphic dataset(N-MNIST and DVS-Gesture), please refer to examples of our another projects[3]:

https://github.com/hewh16/SNNs-RNNs

Requirement

  • Python 3.6
  • MNIST dataset
  • CIFAR10 dataset
  • N_MSNIT dataset

Results

After 100 epochs, it can obtain ~ 99.4% acc on MNIST.

Reference

  1. Wu, Yujie, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. "Direct Training for Spiking Neural Networks: Faster, Larger, Better." arXiv preprint arXiv:1809.05793 (2018).
  2. Wu, Yujie, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. "Spatio-temporal backpropagation for training high-performance spiking neural networks." Frontiers in neuroscience 12 (2018).
  3. He W, Wu Y J, Deng L, et al. Comparing SNNs and RNNs on neuromorphic vision datasets: Similarities and differences[J]. Neural Networks, 2020, 132: 108-120.

stbp-for-training-spikingnn's People

Contributors

yjwu17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stbp-for-training-spikingnn's Issues

how to implement the encoding scheme?

hello, I want ask a question about "Direct Training for Spiking Neural Networks: Faster, Larger, Better“.
How to implement the encoding scheme. Can you give some details. Thanks!

cfg_kernelsize

Hi,

I am referring to your code. My question is how you are taking cfg_kernel_size?

I didn't get the forward function, how you kept cfg_kernel_size? Below is the snippet of your forward function.

Can you please tell me how did you do that?

torch.zeros(batch_size, cfg_cnn[0][1], cfg_kernel[0], cfg_kernel[0], device=device))

Thanks

Derivative Approximation of the Non-Differentiable Spike Activity

Should the temp variable be divided by 2 * lens (i.e temp = (abs(input - thresh) < lens) / (2 * lens) ) ? You choose lens = 0.5 in your code so there is no problem, but if someone wants to tune this parameter the derivative approximation is not correct (based on the paper "Spatio-Temporal Backpropagation for Training High-Performance Spiking Neural Networks").

Reference 1

Can you provide the code of NeuNorm in Reference 1?

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.