Data types
EvaluationType
Bases: str
, Enum
EvaluationType
Passed to Trainer.evaluate(..), and controls which phase callbacks should be triggered (if at all).
Attributes:
TEST
VALIDATION
Source code in common/data_types/enum/evaluation_type.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
MultiGPUMode
Bases: str
, Enum
MultiGPUMode
Attributes:
OFF - Single GPU Mode / CPU Mode
DATA_PARALLEL - Multiple GPUs, Synchronous
DISTRIBUTED_DATA_PARALLEL - Multiple GPUs, Asynchronous
Source code in common/data_types/enum/multi_gpu_mode.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
dict()
classmethod
return dictionary mapping from the mode name (in call string cases) to the enum value
Source code in common/data_types/enum/multi_gpu_mode.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
|
StrictLoad
Bases: Enum
Wrapper for adding more functionality to torch's strict_load parameter in load_state_dict(). Attributes: OFF - Native torch "strict_load = off" behaviour. See nn.Module.load_state_dict() documentation for more details. ON - Native torch "strict_load = on" behaviour. See nn.Module.load_state_dict() documentation for more details. NO_KEY_MATCHING - Allows the usage of SuperGradient's adapt_checkpoint function, which loads a checkpoint by matching each layer's shapes (and bypasses the strict matching of the names of each layer (ie: disregards the state_dict key matching)). This implementation assumes order of layers in the state_dict and model are the same since it goes layer by layer and as name suggest does not use key matching, relying only on index of each weight. KEY_MATCHING - Loose load strategy that loads the state dict from checkpoint into model only for common keys and also handling the case when shapes of the tensors in the state dict and model are different for the same key (Such layers will be skipped).
Source code in common/data_types/enum/strict_load.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|