add factor to adaption step to make it independent of tau_a
This commit is contained in:
parent
4928fedc4e
commit
6cd4e13da4
@ -6,8 +6,9 @@ import numpy as np
|
|||||||
|
|
||||||
class LIFACModel(AbstractModel):
|
class LIFACModel(AbstractModel):
|
||||||
# all times in milliseconds
|
# all times in milliseconds
|
||||||
KEYS = ["mem_res", "mem_tau", "v_base", "v_zero", "threshold", "step_size", "delta_a", "tau_a"]
|
# possible mem_res: 100 * 1000000
|
||||||
VALUES = [100 * 1000000, 0.1 * 200, 0, 0, 10, 0.01, 1, 20]
|
KEYS = ["mem_tau", "v_base", "v_zero", "threshold", "step_size", "delta_a", "tau_a"]
|
||||||
|
VALUES = [0.1 * 200, 0, 0, 10, 0.01, 1, 20]
|
||||||
|
|
||||||
# membrane time constant tau = mem_cap*mem_res
|
# membrane time constant tau = mem_cap*mem_res
|
||||||
def __init__(self, params: dict = None):
|
def __init__(self, params: dict = None):
|
||||||
@ -34,7 +35,7 @@ class LIFACModel(AbstractModel):
|
|||||||
if v_next > self.parameters["threshold"]:
|
if v_next > self.parameters["threshold"]:
|
||||||
v_next = self.parameters["v_base"]
|
v_next = self.parameters["v_base"]
|
||||||
spiketimes.append(time_point/1000)
|
spiketimes.append(time_point/1000)
|
||||||
a_next += self.parameters["delta_a"]
|
a_next += self.parameters["delta_a"] / (self.parameters["tau_a"] / 1000)
|
||||||
|
|
||||||
output_voltage.append(v_next)
|
output_voltage.append(v_next)
|
||||||
adaption.append(a_next)
|
adaption.append(a_next)
|
||||||
|
Loading…
Reference in New Issue
Block a user