devices.dynapse.dynapsim_net_from_specο
- devices.dynapse.dynapsim_net_from_spec(n_cluster: int, core_map: List[int], weights_in: float | ndarray | Tensor | array | None, weights_rec: float | ndarray | Tensor | array | None, Idc: List[float | ndarray | Tensor | array], If_nmda: List[float | ndarray | Tensor | array], Igain_ahp: List[float | ndarray | Tensor | array], Igain_mem: List[float | ndarray | Tensor | array], Igain_syn: List[float | ndarray | Tensor | array], Ipulse_ahp: List[float | ndarray | Tensor | array], Ipulse: List[float | ndarray | Tensor | array], Iref: List[float | ndarray | Tensor | array], Ispkthr: List[float | ndarray | Tensor | array], Itau_ahp: List[float | ndarray | Tensor | array], Itau_mem: List[float | ndarray | Tensor | array], Itau_syn: List[float | ndarray | Tensor | array], Iw_ahp: List[float | ndarray | Tensor | array], Iscale: float = 1e-08, percent_mismatch: float | None = None, dt: float = 0.001, *args, **kwargs) ModuleBase [source]ο
dynapsim_net_from_specification gets a specification and creates a sequential dynapsim network consisting of a linear layer (virtual connections) and a recurrent layer (hardware connections)
- Parameters:
n_cluster (int) β total number of clusters, neural cores allocated
core_map (List[int]) β core map (neuron_id : core_id) for in-device neurons, defaults to CORE_MAP
weights_in (Optional[FloatVector]) β a list of quantized input weight matrices
weights_rec (Optional[FloatVector]) β a list of quantized recurrent weight matrices
Idc (List[FloatVector]) β a list of Constant DC current injected to membrane in Amperes
If_nmda (List[FloatVector]) β a list of NMDA gate soft cut-off current setting the NMDA gating voltage in Amperes
Igain_ahp (List[FloatVector]) β a list of gain bias current of the spike frequency adaptation block in Amperes
Igain_mem (List[FloatVector]) β a list of gain bias current for neuron membrane in Amperes
Igain_syn (List[FloatVector]) β a list of gain bias current of synaptic gates (AMPA, GABA, NMDA, SHUNT) combined in Amperes
Ipulse_ahp (List[FloatVector]) β a list of bias current setting the pulse width for spike frequency adaptation block
`t_pulse_ahp`
in AmperesIpulse (List[FloatVector]) β a list of bias current setting the pulse width for neuron membrane
`t_pulse`
in AmperesIref (List[FloatVector]) β a list of bias current setting the refractory period
`t_ref`
in AmperesIspkthr (List[FloatVector]) β a list of spiking threshold current, neuron spikes if \(I_{mem} > I_{spkthr}\) in Amperes
Itau_ahp (List[FloatVector]) β a list of Spike frequency adaptation leakage current setting the time constant
`tau_ahp`
in AmperesItau_mem (List[FloatVector]) β a list of Neuron membrane leakage current setting the time constant
`tau_mem`
in AmperesItau_syn (List[FloatVector]) β a list of (AMPA, GABA, NMDA, SHUNT) synapses combined leakage current setting the time constant
`tau_syn`
in AmperesIw_ahp (List[FloatVector]) β a list of spike frequency adaptation weight current of the neurons of the core in Amperes
Iscale (float, optional) β network weight scaling current, defaults to default_weights[βIscaleβ]
percent_mismatch (Optional[float], optional) β Gaussian parameter mismatch percentage (check
transform.mismatch_generator
implementation), defaults to Nonedt (float, optional) β The time step for the forward-Euler ODE solver, defaults to 1e-3
- Returns:
a
nn.combinators.Sequential
combinator possibly encapsulating ann.modules.LinearJax
layer and aDynapSim
layer, or just aDynapSim
layer in the case that no input weights defined- Return type: