jeshraghian / snntorch

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

Hashed static method above class Heaviside #348

Open abhishekkumarm98 opened 2 weeks ago

abhishekkumarm98 commented 2 weeks ago

Dear Developers,

While using spike_grad = heaviside(), I encountered a below error:

AttributeError: 'staticmethod' object has no attribute 'apply'

I referred to the file surrogate.py and saw that staticmethod is written above to class Heaviside. That's why it gave me that error; I hashed it. If, it seems correct to you, please merge it into the existing code.

Regards Abhishek