From 47be01507b18fa0970ba81a599441a229d347305 Mon Sep 17 00:00:00 2001 From: neworderofjamie Date: Mon, 29 Jul 2024 13:55:56 +0100 Subject: [PATCH] fixed missing threshold in RCuBaLIF --- spyx/nn.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spyx/nn.py b/spyx/nn.py index ded735c..fead5cd 100644 --- a/spyx/nn.py +++ b/spyx/nn.py @@ -354,12 +354,13 @@ def initial_state(self, batch_size): class RCuBaLIF(hk.RNNCore): def __init__(self, hidden_shape, alpha=None, beta=None, - activation = superspike(), + threshold = 1, activation = superspike(), name="RCuBaLIF"): super().__init__(name=name) self.hidden_shape = hidden_shape self.alpha = alpha self.beta = beta + self.threshold = threshold self.spike = activation def __call__(self, x, VI): @@ -524,4 +525,4 @@ def __init__( def __call__(self, value: jax.Array) -> jax.Array: return sum_pool(value, self.window_shape, self.strides, - self.padding, self.channel_axis) \ No newline at end of file + self.padding, self.channel_axis)