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 Amperes

  • Ipulse (List[FloatVector]) – a list of bias current setting the pulse width for neuron membrane `t_pulse` in Amperes

  • Iref (List[FloatVector]) – a list of bias current setting the refractory period `t_ref` in Amperes

  • Ispkthr (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 Amperes

  • Itau_mem (List[FloatVector]) – a list of Neuron membrane leakage current setting the time constant `tau_mem` in Amperes

  • Itau_syn (List[FloatVector]) – a list of (AMPA, GABA, NMDA, SHUNT) synapses combined leakage current setting the time constant `tau_syn` in Amperes

  • Iw_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 None

  • dt (float, optional) – The time step for the forward-Euler ODE solver, defaults to 1e-3

Returns:

a nn.combinators.Sequential combinator possibly encapsulating a nn.modules.LinearJax layer and a DynapSim layer, or just a DynapSim layer in the case that no input weights defined

Return type:

nn.modules.JaxModule