Skip to content

Commit

Permalink
add the SimpleBaseNode
Browse files Browse the repository at this point in the history
  • Loading branch information
fangwei123456 committed Dec 4, 2023
1 parent 73e67fb commit ec09d18
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spikingjelly/activation_based/neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ def __init__(self, v_threshold: float = 1., v_reset: float = 0.,
self.step_mode = step_mode
self.register_memory(name='v', value=0.)

def single_step_forward(self, x: torch.Tensor):

self.neuronal_charge(x)
spike = self.neuronal_fire()
self.neuronal_reset(spike)
return spike

def neuronal_charge(self, x: torch.Tensor):
raise NotImplementedError

Expand Down

0 comments on commit ec09d18

Please sign in to comment.