devices.dynapse.config_from_specificationο
- devices.dynapse.config_from_specification(n_cluster: int, core_map: List[int], weights_in: List[int | ndarray | Tensor | array | None] | None, weights_rec: List[int | ndarray | Tensor | array | None] | 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], sign_in: List[int | ndarray | Tensor | array | None] | None = None, sign_rec: List[int | ndarray | Tensor | array | None] | None = None, Iw_0: List[float | ndarray | Tensor | array] | None = None, Iw_1: List[float | ndarray | Tensor | array] | None = None, Iw_2: List[float | ndarray | Tensor | array] | None = None, Iw_3: List[float | ndarray | Tensor | array] | 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 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
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]]