devices.xylo.syns61201.config_from_specification
- devices.xylo.syns61201.config_from_specification(weights_in: ndarray, weights_out: ndarray, weights_rec: ndarray | None = None, dash_mem: ndarray | None = None, dash_mem_out: ndarray | None = None, dash_syn: ndarray | None = None, dash_syn_2: ndarray | None = None, dash_syn_out: ndarray | None = None, threshold: ndarray | None = None, threshold_out: ndarray | None = None, bias_hidden: ndarray | None = None, bias_out: ndarray | None = None, weight_shift_in: int = 0, weight_shift_rec: int = 0, weight_shift_out: int = 0, aliases: List[List[int]] | None = None, *args, **kwargs) Tuple[XyloConfiguration, bool, str] [source]
Convert a full network specification to a xylo config and validate it
See also
For detailed information about the networks supported on Xylo, see 🐝 Overview of the Xylo™ family
- Parameters:
weights_in (np.ndarray) – A quantised 8-bit input weight matrix
(Nin, Nin_res, 2)
. The third dimension specifies connections onto the second input synapse for each neuron.Nin_res
indicates the number of hidden-layer neurons that receive input from the input channels.weights_rec (np.ndarray) – A quantised 8-bit recurrent weight matrix
(Nhidden, Nhidden, 2)
. The third dimension specified connections onto the second input synapse for each neuron. Default:0
weights_out (np.ndarray) – A quantised 8-bit output weight matrix
(Nhidden, Nout)
.dash_mem (np.ndarray) – A vector or list
(Nhidden,)
specifing decay bitshift for neuron state for each hidden layer neuron. Default:1
dash_mem_out (np.ndarray) – A vector or list
(Nout,)
specifing decay bitshift for neuron state for each output neuron. Default:1
dash_syn (np.ndarray) – A vector or list
(Nhidden,)
specifing decay bitshift for synapse 1 state for each hidden layer neuron. Default:1
dash_syn_2 (np.ndarray) – A vector or list
(Nhidden,)
specifing decay bitshift for synapse 2 state for each hidden layer neuron. Default:1
dash_syn_out (np.ndarray) – A vector or list
(Nout,)
specifing decay bitshift for synapse state for each output layer neuron. Default:1
threshold (np.ndarray) – A vector or list
(Nhidden,)
specifing the firing threshold for each hidden layer neuron. Default:0
threshold_out (np.ndarray) – A vector or list
(Nout,)
specifing the firing threshold for each output layer neuron. Default:0
weight_shift_in (int) – The number of bits to left-shift each input weight. Default:
0
weight_shift_rec (int) – The number of bits to left-shift each recurrent weight. Default:
0
weight_shift_out (int) – The number of bits to left-shift each output layer weight. Default:
0
aliases (Optional[List[List[int]]]) – For each neuron in the hidden population, a list containing the alias targets for that neuron
- Returns: (
samna.xyloCore2.XyloConfiguration
, bool, str): config, is_valid, message config
will be aXyloConfiguration
.is_valid
will be a boolean flagTrue
iff the configuration is valid.message
will be an empty string if the configuration is valid, or a message indicating why the configuration is invalid.