Giter Site home page Giter Site logo

enabling_spikebased_backpropagation's People

Contributors

chan8972 avatar shakib7 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

Watchers

 avatar  avatar  avatar  avatar

enabling_spikebased_backpropagation's Issues

Estimating Energy consumption

Hi,

I wanna calculate the total energy consumption of the ANN and SNN model.

I've read your article that you calculated the total energy consumption for both ANN and SNN models, which I got it.

For the SNN model, total energy consumption is calculated as (# of neurons in a particular layer * # of synaptic connections* average spiking activity).

I didn't exactly understand, how did you calculate the total energy for VGG and ResNet for SNN and ANN models which you've reported in your article? I mean the ratios?

For instance, I've made 4 layer SNN and ANN model for the MNIST dataset then how could I calculate the total energy?

I mean, how I know the total number of spikes in one inference image?

Do you have any code for that, so that I can calculate or Can you please give me an example??

Your help will be highly appreciated.

Thanks

Issues in training from scratch

Hi,

When I am trying to train from scratch, I get such an error :

"Traceback (most recent call last):
File "cifar10_ResNet11.py", line 704, in
main()
File "cifar10_ResNet11.py", line 143, in main
train(train_loader, model, criterion, criterion_en, optimizer, epoch, time_steps=100, leak=0.99)
File "cifar10_ResNet11.py", line 206, in train
output, Total_11_output, LF_11_output, Total_21_output, LF_21_output, Total_22_output, LF_22_output, Total_31_output, LF_31_output, Total_32_output, LF_32_output, Total_41_output, LF_41_output, Total_42_output, LF_42_output, Total_51_output, LF_51_output, Total_52_output, LF_52_output, Total_f0_output, LF_f0_output, out11_temp, out21_temp, out22_temp, out31_temp, out32_temp, out41_temp, out42_temp, out51_temp, out52_temp, outf0_temp = model(input_var, steps=time_steps, l=leak)
File "/home/ubuntu/anaconda3/envs/pytorch_p27/lib/python2.7/site-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "cifar10_ResNet11.py", line 570, in forward
mem_11, out = LIF_sNeuron(mem_11, self.cnn11.threshold, l, i)
File "cifar10_ResNet11.py", line 411, in LIF_sNeuron
out = SpikingNN()(ex_membrane)
TypeError: forward() takes exactly 2 arguments (1 given)".

Can you please check from your side?

Forward Function

Hi,

I am referring to your code. I have some confusion related to forward function.

I'm trying to implement VGG11 using the CIFAR10 dataset but got some dimension errors.

Can you please explain how did you make the dimensions inside forward function like this?

torch.zeros(batch_size, 64, 32, 32, device=device))

When I tried this using VGG11 , got this error?

image

It means my dimensions are not correct.

Below is the snippet of my forward function:

image

Issue about Poisson encoding method

I notice the implementation of Poisson-distributed spike as below

rand_num = Variable(torch.rand(input.size(0), input.size(1), input.size(2), input.size(3)).cuda())
Poisson_d_input = (torch.abs(input) > rand_num).type(torch.cuda.FloatTensor)
Poisson_d_input = torch.mul(Poisson_d_input, torch.sign(input))

which means that the encoded spikes are triple-valued {0, ±1}. It's a little different from the well-known encoding style with binary value {0, 1}.

I wonder why you choose this way of Poisson encoding.

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.