From 8ed81d57fb98951cdf2de136adbb94986c29fcb7 Mon Sep 17 00:00:00 2001 From: chcaccac Date: Mon, 12 Feb 2024 18:28:47 +0100 Subject: [PATCH] fixing graded surrogate gradient sign --- src/lava/lib/dl/slayer/spike/spike.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lava/lib/dl/slayer/spike/spike.py b/src/lava/lib/dl/slayer/spike/spike.py index 4b2347d07..fe968ddb7 100644 --- a/src/lava/lib/dl/slayer/spike/spike.py +++ b/src/lava/lib/dl/slayer/spike/spike.py @@ -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 )