fangwei123456
fangwei123456
这个教程是spiking resnet的,但很容易改成sew resnet,而且框架里面提供了网络定义的代码: https://github.com/fangwei123456/spikingjelly/blob/master/spikingjelly/activation_based/model/sew_resnet.py
某个版本后的SJ框架中就支持返回v_seq和spike_seq了
在新版SJ框架中,如果不使用cupy后端,多步的前向传播是通过多次调用单步实现的,而单步的实现是纯python,但你这个报错是cuda编译问题: `RuntimeError: nvrtc: error: invalid value for --gpu-architecture (-arch)` 应该是你在某些地方引入自定义CUDA扩展,但CUDA的代码有问题导致的
SEW-Resnet18这个网络适合imagenet,对于dvs手势而言过于庞大了,因此原文才重新设计了一个小网络
Yes, because the default `torch` backend is too slow.
That is unexpected because `cupy` and `torch` backends have the identical outputs and gradients.
You can check if `w.grad` of the PLIF neuron is identical when you use different backends.
According to `readme.md`, you can install the specific version: > > The origin codes uses a specific SpikingJelly. To maximize reproducibility, the user can download the latest SpikingJelly and rollback...
> As the net goes deeper, it will generate less spikes thus cause the accuracy lower. The experiment proved this, while I saw the accuracy decreased after few epochs. Yes,...
实际上是需要的,最终a的梯度是所有a[t]梯度之和。在论文里面直接写了求和式,跳过了这一个中间步骤。方法类似于《深度学习》一书中介绍BPTT如何对W求梯度时用的方法: 