We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2cb5bcb + 49a4b35 commit 8e5962fCopy full SHA for 8e5962f
snntorch/export_nir.py
@@ -27,6 +27,7 @@ def _extract_snntorch_module(module: torch.nn.Module) -> Optional[nir.NIRNode]:
27
28
beta = module.beta.detach().numpy()
29
vthr = module.threshold.detach().numpy()
30
+ vthr = np.array([vthr]) if isinstance(vthr, (int, float)) else vthr
31
tau_mem = dt / (1 - beta)
32
r = tau_mem / dt
33
v_leak = np.zeros_like(beta)
@@ -56,6 +57,7 @@ def _extract_snntorch_module(module: torch.nn.Module) -> Optional[nir.NIRNode]:
56
57
alpha = module.alpha.detach().numpy()
58
59
60
61
62
tau_syn = dt / (1 - alpha)
63
0 commit comments