load_state

Contents

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 with missing_keys and unexpected_keys fields:

  • missing_keys is a list of str containing the missing keys

  • unexpected_keys is a list of str containing the unexpected keys