load_state#
- class brainpy.load_state(target, state_dict, **kwargs)[source]#
Copy parameters and buffers from
state_dict
into this module and its descendants.- Parameters:
target (
DynamicalSystem
) – DynamicalSystem. The dynamical system to load its states.state_dict (
Dict
) – dict. A dict containing parameters and persistent buffers.
Returns:#
NamedTuple
withmissing_keys
andunexpected_keys
fields:missing_keys is a list of str containing the missing keys
unexpected_keys is a list of str containing the unexpected keys