MCPcopy
hub / github.com/apple/ml-4m / load

Function load

fourm/utils/checkpoint.py:52–59  ·  view source on GitHub ↗
(module, prefix='')

Source from the content-addressed store, hash-verified

50 state_dict._metadata = metadata
51
52 def load(module, prefix=''):
53 local_metadata = {} if metadata is None else metadata.get(
54 prefix[:-1], {})
55 module._load_from_state_dict(
56 state_dict, prefix, local_metadata, True, missing_keys, unexpected_keys, error_msgs)
57 for name, child in module._modules.items():
58 if child is not None:
59 load(child, prefix + name + '.')
60
61 load(model, prefix=prefix)
62

Callers 1

load_state_dictFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected