MCPcopy Create free account
hub / github.com/BindsNET/bindsnet / IzhikevichNodes

Class IzhikevichNodes

bindsnet/network/nodes.py:1147–1316  ·  view source on GitHub ↗

Layer of `Izhikevich neurons `_.

Source from the content-addressed store, hash-verified

1145
1146
1147class IzhikevichNodes(Nodes):
1148 # language=rst
1149 """
1150 Layer of `Izhikevich neurons<https://www.izhikevich.org/publications/spikes.htm>`_.
1151 """
1152
1153 def __init__(
1154 self,
1155 n: Optional[int] = None,
1156 shape: Optional[Iterable[int]] = None,
1157 traces: bool = False,
1158 traces_additive: bool = False,
1159 tc_trace: Union[float, torch.Tensor] = 20.0,
1160 trace_scale: Union[float, torch.Tensor] = 1.0,
1161 sum_input: bool = False,
1162 excitatory: float = 1,
1163 thresh: Union[float, torch.Tensor] = 45.0,
1164 rest: Union[float, torch.Tensor] = -65.0,
1165 lbound: float = None,
1166 **kwargs,
1167 ) -> None:
1168 # language=rst
1169 """
1170 Instantiates a layer of Izhikevich neurons.
1171
1172 :param n: The number of neurons in the layer.
1173 :param shape: The dimensionality of the layer.
1174 :param traces: Whether to record spike traces.
1175 :param traces_additive: Whether to record spike traces additively.
1176 :param tc_trace: Time constant of spike trace decay.
1177 :param trace_scale: Scaling factor for spike trace.
1178 :param sum_input: Whether to sum all inputs.
1179 :param excitatory: Percent of excitatory (vs. inhibitory) neurons in the layer; in range ``[0, 1]``.
1180 :param thresh: Spike threshold voltage.
1181 :param rest: Resting membrane voltage.
1182 :param lbound: Lower bound of the voltage.
1183 """
1184 super().__init__(
1185 n=n,
1186 shape=shape,
1187 traces=traces,
1188 traces_additive=traces_additive,
1189 tc_trace=tc_trace,
1190 trace_scale=trace_scale,
1191 sum_input=sum_input,
1192 )
1193
1194 self.register_buffer("rest", torch.tensor(rest)) # Rest voltage.
1195 self.register_buffer("thresh", torch.tensor(thresh)) # Spike threshold voltage.
1196 self.lbound = lbound
1197
1198 self.register_buffer("r", None)
1199 self.register_buffer("a", None)
1200 self.register_buffer("b", None)
1201 self.register_buffer("c", None)
1202 self.register_buffer("d", None)
1203 self.register_buffer("S", None)
1204 self.register_buffer("excitatory", None)

Callers 1

breakout.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected