Giter Club home page Giter Club logo

conv_snn's Issues

Parameter or weight for high accuracy

Hi,
We are trying to make some further developments based on your methods. Is it possible to share the training parameters to achieve the high accuracy or even the trained weight for CIFAR10-DVS?
Thanks.

implementation errors

hello. I am a student reproducing your paper.
I found the following problem in the code.

  1. AveragePooling is removing binarization characteristics of spike input.
  2. Spatial dropout is removing the binarization feature.

Actually, I can't understand that part of the paper.
"they(avgPool) do not interfere with the binary nature of the architecture (a fact never mentioned before in previous works"
Event-based spikies generally have sparse data, so of course the binary property is lost during the average pooling process (because of 0).

Also, I confirmed that a value greater than 1 occurs due to the x/(dropout weight) formula in the spatial dropout.

+) In addition, when constructing the resnet block, it was confirmed that it goes through Convolution immediately after Convolution. This is an implementation that doesn't make sense.

I want to know if there is an exact implementation code.

RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

Got an error in Training & Testing

(conv_snn) test@test-dual1060:~/Desktop/project/conv_snn/CIFAR10-DVS$ python3 main.py
device cuda
  0%|                                                                                                      | 0/1750 [00:00<?, ?it/s]
==> Build model and setup loss and optimizer
==> Epoch:[0/500][training stage]
  0%|                                                                                                      | 0/1750 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "main.py", line 231, in <module>
    main()
  File "main.py", line 65, in main
    model.run()
  File "main.py", line 124, in run
    self.train_1epoch()
  File "main.py", line 172, in train_1epoch
    prec1, prec5 = accuracy(output.data, label.cuda(), topk=(1, 5))
  File "/home/test/Desktop/project/conv_snn/CIFAR10-DVS/utils.py", line 30, in accuracy
    correct_k = correct[:k].view(-1).float().sum(0)
RuntimeError: view size is not compatible with input tensor's size and stride (at least one dimension spans across two contiguous subspaces). Use .reshape(...) instead.

NMNIST

Thanks for your code. And I guess how this code run on the NMNIST dataset. Could you provide an example?

about seq5 in synthetic dataset

In you paper, the seq5 example in Figure 4 is rotated with a random degree between 0 and 360 degrees. but it can't be distinguished between clockwise or counterclockwise. Because i can't find some evidence for rotation direction. In other words, clockwise 30 degree is equivalent to counterclockwise 270 degree, so how you can classify the rotation direction.

Typos in code

line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/dvscifar_dataloader.py#L117
should be:
torch.save([torch.Tensor(frames), torch.Tensor([labels,])],

line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/main.py#L211
should be:
output = self.model(data0.cuda())

line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/main.py#L217
should be:
prec1, prec5 = accuracy(output.data, label.cuda(), topk=(1, 5))

line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/main.py#L227
should be:
return top1.avg

line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/main.py#L133
should be:
prec1 = self.validate_1epoch()

I would also get rid of this line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/main.py#L132

line: https://github.com/aa-samad/conv_snn/blob/master/CIFAR10-DVS/network.py#L165
should be:
x = torch.cat(c2_spike[1::2], dim=1)

NameError: name 'lr_scheduler' is not defined

Running the code in folder Tests_1-3_and_5. It seens that all the code had the same error below.

8192it [00:02, 3912.96it/s]                                                                                               
9920512it [00:19, 1117448.86it/s]                                                                                         Epoch [1/10], Step [100/600], Loss: nan
Time elasped: 11.564528942108154
                                                                                                                         Epoch [1/10], Step [200/600], Loss: nan
Time elasped: 22.981971263885498]                                                                                         
Epoch [1/10], Step [300/600], Loss: nan
Time elasped: 34.35000038146973
Epoch [1/10], Step [400/600], Loss: nan
Time elasped: 45.67948770523071
Epoch [1/10], Step [500/600], Loss: nan
Time elasped: 56.9581983089447
Epoch [1/10], Step [600/600], Loss: nan
Time elasped: 68.23811769485474
Traceback (most recent call last):
  File "main.py", line 94, in <module>
    optimizer = lr_scheduler(optimizer, epoch, learning_rate, 40)
NameError: name 'lr_scheduler' is not defined
9920512it [01:22, 120381.43it/s] 
1654784it [01:12, 22939.77it/s]  

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.