Skip to content

Commit

Permalink
fixing graded surrogate gradient sign (#286)
Browse files Browse the repository at this point in the history
Co-authored-by: chcaccac <[email protected]>
  • Loading branch information
ccaccavella and chcaccac authored Feb 13, 2024
1 parent 242a47e commit 1fd0647
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lava/lib/dl/slayer/spike/spike.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _spike_backward(
)

return scale_rho * torch.exp(
-torch.clamp(voltage - threshold, max=0) / tau_rho
torch.clamp(voltage - threshold, max=0) / tau_rho
)


Expand Down

0 comments on commit 1fd0647

Please sign in to comment.