devices.dynapse.config_from_specification

devices.dynapse.config_from_specification(n_cluster: int, core_map: List[int], weights_in: List[int | ndarray | Tensor | None] | None, weights_rec: List[int | ndarray | Tensor | None] | None, Idc: List[float | ndarray | Tensor], If_nmda: List[float | ndarray | Tensor], Igain_ahp: List[float | ndarray | Tensor], Igain_mem: List[float | ndarray | Tensor], Igain_syn: List[float | ndarray | Tensor], Ipulse_ahp: List[float | ndarray | Tensor], Ipulse: List[float | ndarray | Tensor], Iref: List[float | ndarray | Tensor], Ispkthr: List[float | ndarray | Tensor], Itau_ahp: List[float | ndarray | Tensor], Itau_mem: List[float | ndarray | Tensor], Itau_syn: List[float | ndarray | Tensor], Iw_ahp: List[float | ndarray | Tensor], sign_in: List[int | ndarray | Tensor | None] | None = None, sign_rec: List[int | ndarray | Tensor | None] | None = None, Iw_0: List[float | ndarray | Tensor] | None = None, Iw_1: List[float | ndarray | Tensor] | None = None, Iw_2: List[float | ndarray | Tensor] | None = None, Iw_3: List[float | ndarray | Tensor] | None = None, chip_map: Dict[int, int] = {-4: -1, -3: -1, -2: -1, -1: -1, 0: 0, 1: 0, 2: 0, 3: 0, 4: 1, 5: 1, 6: 1, 7: 1, 8: 2, 9: 2, 10: 2, 11: 2, 12: 3, 13: 3, 14: 3, 15: 3}, chip_pos: Dict[int, Tuple[int]] = {-1: (0, 0), 0: (1, 0), 1: (2, 0), 3: (3, 0), 4: (4, 0)}, num_cores: int = 4, num_neurons: int = 256, *args, **kwargs) Dynapse2Configuration[source]

config_from_specification gets a specification and creates a samna configuration object for Dynap-SE2 chip. All the parameteres and weight matrices are provided as lists, indices indicating the exact cluster(core id).

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[List[Optional[IntVector]]]) – a list of quantized input weight matrices

  • weights_rec (Optional[List[Optional[IntVector]]]) – 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

  • sign_in (Optional[List[Optional[IntVector]]]) – a list of input weight directions (+1 : excitatory, -1 : inhibitory) matrices, defaults to None

  • sign_rec (Optional[List[Optional[IntVector]]]) – a list of recurrent weight directions (+1 : excitatory, -1 : inhibitory) matrices, defaults to None

  • Iw_0 (Optional[List[FloatVector]]) – a list of weight bit 0 current of the neurons of the core in Amperes, defaults to None

  • Iw_1 (Optional[List[FloatVector]]) – a list of weight bit 1 current of the neurons of the core in Amperes, defaults to None

  • Iw_2 (Optional[List[FloatVector]]) – a list of weight bit 2 current of the neurons of the core in Amperes, defaults to None

  • Iw_3 (Optional[List[FloatVector]]) – a list of weight bit 3 current of the neurons of the core in Amperes, defaults to None

  • chip_map (Dict[int, int], optional) – chip map (core_id : chip_id) for all cores, defaults to CHIP_MAP

  • chip_pos (Dict[int, Tuple[int]], optional) – global chip position dictionary (chip_id : (xpos,ypos)), defaults to CHIP_POS

  • num_cores (int, optional) – the number of cores per chip, defaults to NUM_CORES

  • num_neurons (int, optional) – the number of neurons per core, defaults to NUM_NEURONS

Returns:

config, input_channel_map :config: a modified samna Dynapse2Configuration object :input_channel_map: the mapping between input timeseries channels and the destinations

Return type:

Tuple[Dynapse2Configuration, Dict[int, Dynapse2Destination]]