super_gradients.common.data_types package

Subpackages

Module contents

class super_gradients.common.data_types.StrictLoad(value)[source]

Bases: enum.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)).

OFF = False
ON = True
NO_KEY_MATCHING = 'no_key_matching'
class super_gradients.common.data_types.DeepLearningTask(value)[source]

Bases: str, enum.Enum

An enumeration.

CLASSIFICATION = 'classification'
SEMANTIC_SEGMENTATION = 'semantic_segmentation'
OBJECT_DETECTION = 'object_detection'
DEPTH_ESTIMATION = 'depth_estimation'
POSE_ESTIMATION = 'pose_estimation'
NLP = 'nlp'
OTHER = 'other'
class super_gradients.common.data_types.EvaluationType(value)[source]

Bases: str, enum.Enum

Passed to SgModel.evaluate(..), and controls which phase callbacks should be triggered (if at all).

Attributes:

TEST VALIDATION

TEST = 'TEST'
VALIDATION = 'VALIDATION'
class super_gradients.common.data_types.MultiGPUMode(value)[source]

Bases: str, enum.Enum

OFF                       - Single GPU Mode / CPU Mode
DATA_PARALLEL             - Multiple GPUs, Synchronous
DISTRIBUTED_DATA_PARALLEL - Multiple GPUs, Asynchronous
OFF = 'Off'
DATA_PARALLEL = 'DP'
DISTRIBUTED_DATA_PARALLEL = 'DDP'
AUTO = 'AUTO'