GithubHelp home page GithubHelp logo

Comments (3)

rbodo avatar rbodo commented on July 20, 2024

It has to do with the normalization. We normalized the weights of each layer such that the ANN activations usually do not exceed 1. That means, the weighted sum above is usually smaller than 1. In the SNN, each neuron has a threshold. Imagine as an extreme case that this threshold is 1000. Then it will take 1000 time steps even for the largest input (1) to excite a neuron to fire a single spike, which effectively reduces the spikerate by a factor of 1000. So we scale the input by the threshold here to get a one-to-one correspondence between ANN activations and SNN spikerates.

In practice however, we set the threshold to 1 anyways, so it does not matter.

from snn_toolbox.

ljxgit avatar ljxgit commented on July 20, 2024

Thanks, rbodo, I got it
I want to ask one more question, I run the example program for the BinaryConnect, and I set the "binarize_weights = True" in the config file, why the weights are still in a real number range?
image
Thanks rbodo!

from snn_toolbox.

rbodo avatar rbodo commented on July 20, 2024

The reason is that the BinaryConnect architecture proposed by Courbariaux et al. uses BatchNormalization layers between Convolution and Activation layers. So after the ConvLayer weights have been binarized, The BatchNorm layers perform a linear transformation on the weights of each channel of the ConvLayer. That's why you get 128 different real numbers in the histogram.

from snn_toolbox.

Related Issues (20)

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.