parameters.Constant

parameters.Constant(obj: Any) RP_Constant[source]

Identify an initialisation argument as a constant (non-trainable) parameter

Examples
>>> mod = LIFJax(1)
>>> mod.parameters('taus')
{'tau_mem': DeviceArray([0.02], dtype=float32),
 'tau_syn': DeviceArray([[0.02]], dtype=float32)}
>>> mod.simulation_parameters('taus')
{}
>>> mod = LIFJax(1, tau_mem = Constant(10e-3))
>>> mod.parameters('taus')
{'tau_syn': DeviceArray([[0.02]], dtype=float32)}
>>> mod.simulation_parameters('taus')
{'tau_mem': DeviceArray(0.01, dtype=float32)}
Parameters:

obj (Any) – The initialisation object to wrap

Returns:

A wrapped object, of the same class as obj.