jeshraghian / snntorch

Deep and online learning with spiking neural networks in Python
https://snntorch.readthedocs.io/en/latest/
MIT License
1.37k stars 228 forks source link

'snntorch' has no attribute 'FastSigmoid' #32

Closed Dola47 closed 3 years ago

Dola47 commented 3 years ago

Description

I tried to use the surrogate gradient function by running the following line of code:

spike_grad = snn.FastSigmoid.apply

However, I am getting an error stating that "module 'snntorch' has no attribute 'FastSigmoid'".

I see that it is not implemented yet to the neuron models in your init.py file, may I ask when the push is going to be done?

Moreover, I see that we have only examples of applying rate encoding to the MNIST dataset, I need to ask if it is possible to have an example showing how to use the Latency encoding may also be on a Convolution network?

Thanks in advance.

vinniesun commented 3 years ago

Hi Dola47,

Please use the code below to call the FastSigmoid function

`from snntorch import surrogate

spike_grad = surrogate.FastSigmoid.apply`