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

Class DiehlAndCookNodes

bindsnet/network/nodes.py:981–1144  ·  view source on GitHub ↗

Layer of leaky integrate-and-fire (LIF) neurons with adaptive thresholds (modified for Diehl & Cook 2015 replication).

Source from the content-addressed store, hash-verified

979
980
981class DiehlAndCookNodes(Nodes):
982 # language=rst
983 """
984 Layer of leaky integrate-and-fire (LIF) neurons with adaptive thresholds (modified for Diehl & Cook 2015
985 replication).
986 """
987
988 def __init__(
989 self,
990 n: Optional[int] = None,
991 shape: Optional[Iterable[int]] = None,
992 traces: bool = False,
993 traces_additive: bool = False,
994 tc_trace: Union[float, torch.Tensor] = 20.0,
995 trace_scale: Union[float, torch.Tensor] = 1.0,
996 sum_input: bool = False,
997 thresh: Union[float, torch.Tensor] = -52.0,
998 rest: Union[float, torch.Tensor] = -65.0,
999 reset: Union[float, torch.Tensor] = -65.0,
1000 refrac: Union[int, torch.Tensor] = 5,
1001 tc_decay: Union[float, torch.Tensor] = 100.0,
1002 theta_plus: Union[float, torch.Tensor] = 0.05,
1003 tc_theta_decay: Union[float, torch.Tensor] = 1e7,
1004 lbound: float = None,
1005 one_spike: bool = True,
1006 **kwargs,
1007 ) -> None:
1008 # language=rst
1009 """
1010 Instantiates a layer of Diehl & Cook 2015 neurons.
1011
1012 :param n: The number of neurons in the layer.
1013 :param shape: The dimensionality of the layer.
1014 :param traces: Whether to record spike traces.
1015 :param traces_additive: Whether to record spike traces additively.
1016 :param tc_trace: Time constant of spike trace decay.
1017 :param trace_scale: Scaling factor for spike trace.
1018 :param sum_input: Whether to sum all inputs.
1019 :param thresh: Spike threshold voltage.
1020 :param rest: Resting membrane voltage.
1021 :param reset: Post-spike reset voltage.
1022 :param refrac: Refractory (non-firing) period of the neuron.
1023 :param tc_decay: Time constant of neuron voltage decay.
1024 :param theta_plus: Voltage increase of threshold after spiking.
1025 :param tc_theta_decay: Time constant of adaptive threshold decay.
1026 :param lbound: Lower bound of the voltage.
1027 :param one_spike: Whether to allow only one spike per timestep.
1028 """
1029 super().__init__(
1030 n=n,
1031 shape=shape,
1032 traces=traces,
1033 traces_additive=traces_additive,
1034 tc_trace=tc_trace,
1035 trace_scale=trace_scale,
1036 sum_input=sum_input,
1037 )
1038

Callers 7

conv3d_MNIST.pyFile · 0.90
conv1d_MNIST.pyFile · 0.90
conv_mnist.pyFile · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected