Skip to content

Commit

Permalink
Merge pull request #32 from neworderofjamie/main
Browse files Browse the repository at this point in the history
Fixed missing threshold in RCuBaLIF
  • Loading branch information
kmheckel authored Jul 29, 2024
2 parents df72c93 + 47be015 commit bc4b4f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spyx/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
self.padding, self.channel_axis)

0 comments on commit bc4b4f1

Please sign in to comment.