|
Safemotion Lib
|
Classes | |
| class | Checkpointer |
| class | PeriodicCheckpointer |
Functions | |
| get_missing_parameters_message (list keys) | |
| get_unexpected_parameters_message (list keys) | |
| _strip_prefix_if_present (collections.OrderedDict state_dict, str prefix) | |
| _group_checkpoint_keys (list keys) | |
| _group_to_str (list group) | |
|
protected |
Group keys based on common prefixes. A prefix is the string up to the final
"." in each key.
Args:
keys (list[str]): list of parameter names, i.e. keys in the model
checkpoint dict.
Returns:
dict[list]: keys with common prefixes are grouped into lists.
Definition at line 369 of file checkpoint.py.
|
protected |
Format a group of parameter name suffixes into a loggable string.
Args:
group (list[str]): list of parameter name suffixes.
Returns:
str: formated string.
Definition at line 390 of file checkpoint.py.
|
protected |
Strip the prefix in metadata, if any.
Args:
state_dict (OrderedDict): a state-dict to be loaded to the model.
prefix (str): prefix.
Definition at line 336 of file checkpoint.py.
| fastreid.utils.checkpoint.get_missing_parameters_message | ( | list | keys | ) |
Get a logging-friendly message to report parameter names (keys) that are in
the model but not found in a checkpoint.
Args:
keys (list[str]): List of keys that were not found in the checkpoint.
Returns:
str: message.
Definition at line 301 of file checkpoint.py.
| fastreid.utils.checkpoint.get_unexpected_parameters_message | ( | list | keys | ) |
Get a logging-friendly message to report parameter names (keys) that are in
the checkpoint but not found in the model.
Args:
keys (list[str]): List of keys that were not found in the model.
Returns:
str: message.
Definition at line 318 of file checkpoint.py.