devices.dynapse.dynapsim_net_from_config

devices.dynapse.dynapsim_net_from_config(config: Dynapse2Configuration, input_channel_map: Dict[int, Dynapse2Destination] | None = None, Iscale: float = 1e-08, percent_mismatch: float | None = None, dt: float = 0.001, *args, **kwargs) JaxModule[source]

dynapsim_net_from_config constructs a DynapSim network by processing a samna configuration object

Parameters:
  • config (Dynapse2Configuration) – a samna configuration object used to configure all the system level properties

  • input_channel_map (Dict[int, Dynapse2Destination]) – the mapping between input timeseries channels and the destinations, Providing an input channel map restores the zero rows that may occur in the simulation input weight matrices. The exact same dimensional weight matrix can only be restored in this way

  • Iscale (float, optional) – network weight scaling current, defaults to default_weights[β€œIscale”]

  • percent_mismatch (Optional[float], optional) – Gaussian parameter mismatch percentage (check transforms.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