tabensemb.model.AbstractNN._load_from_state_dict#
method
- AbstractNN._load_from_state_dict(state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs)#
Copies parameters and buffers from
state_dictinto only this module, but not its descendants. This is called on every submodule inload_state_dict(). Metadata saved for this module in inputstate_dictis provided aslocal_metadata. For state dicts without metadata,local_metadatais empty. Subclasses can achieve class-specific backward compatible loading using the version number at local_metadata.get(“version”, None).Note
state_dictis not the same object as the inputstate_dicttoload_state_dict(). So it can be modified.- Parameters:
state_dict¶ (dict) – a dict containing parameters and persistent buffers.
prefix¶ (str) – the prefix for parameters and buffers used in this module
local_metadata¶ (dict) – a dict containing the metadata for this module. See
strict¶ (bool) – whether to strictly enforce that the keys in
state_dictwithprefixmatch the names of parameters and buffers in this modulemissing_keys¶ (list of str) – if
strict=True, add missing keys to this listunexpected_keys¶ (list of str) – if
strict=True, add unexpected keys to this listerror_msgs¶ (list of str) – error messages should be added to this list, and will be reported together in
load_state_dict()