fangwei123456 / spikingjelly

SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
https://spikingjelly.readthedocs.io
Other
1.35k stars 239 forks source link

Deconvolutional (Spiking) layers #309

Closed GorkaAbad closed 1 year ago

GorkaAbad commented 1 year ago

Hi, I want to create a (Spiking) autoencoder. However, I checked, and there are no Deconvolutional layers in spikingjelly/activation_based/layer.py. Can we create an autoencoder with LIF neurons from scratch? Is it preferred to use ANN2SNN? I assume the last won't work because it requires spiking deconv layers.

Do you have any suggestions? Thanks in advance Gorka

fangwei123456 commented 1 year ago

Hi,I wll add the deconv layers.

Is it preferred to use ANN2SNN?

I think you can use it as long as your ANN use ReLU activation.

fangwei123456 commented 1 year ago

We have added ConvTranspose layers:

https://github.com/fangwei123456/spikingjelly/blob/df2127b94e09890df850996e990cee5ff782f522/spikingjelly/activation_based/layer.py#L276

GorkaAbad commented 1 year ago

Thanks for the fast reply. I tried it and works perfectly.

Thanks again