sparseml.pytorch package¶
Subpackages¶
- sparseml.pytorch.datasets package
- Subpackages
- sparseml.pytorch.datasets.classification package
- Submodules
- sparseml.pytorch.datasets.classification.cifar module
- sparseml.pytorch.datasets.classification.imagefolder module
- sparseml.pytorch.datasets.classification.imagenet module
- sparseml.pytorch.datasets.classification.imagenette module
- sparseml.pytorch.datasets.classification.mnist module
- Module contents
- sparseml.pytorch.datasets.detection package
- sparseml.pytorch.datasets.recommendation package
- sparseml.pytorch.datasets.video package
- sparseml.pytorch.datasets.classification package
- Submodules
- sparseml.pytorch.datasets.generic module
- sparseml.pytorch.datasets.registry module
- Module contents
- Subpackages
- sparseml.pytorch.framework package
- sparseml.pytorch.models package
- Subpackages
- sparseml.pytorch.models.classification package
- Submodules
- sparseml.pytorch.models.classification.darknet module
- sparseml.pytorch.models.classification.efficientnet module
- sparseml.pytorch.models.classification.inception_v3 module
- sparseml.pytorch.models.classification.mnist module
- sparseml.pytorch.models.classification.mobilenet module
- sparseml.pytorch.models.classification.mobilenet_v2 module
- sparseml.pytorch.models.classification.resnet module
- sparseml.pytorch.models.classification.vgg module
- Module contents
- sparseml.pytorch.models.detection package
- sparseml.pytorch.models.external package
- sparseml.pytorch.models.recommendation package
- sparseml.pytorch.models.classification package
- Submodules
- sparseml.pytorch.models.registry module
- Module contents
- Subpackages
- sparseml.pytorch.nn package
- sparseml.pytorch.optim package
- Submodules
- sparseml.pytorch.optim.analyzer_as module
- sparseml.pytorch.optim.analyzer_module module
- sparseml.pytorch.optim.analyzer_pruning module
- sparseml.pytorch.optim.manager module
- sparseml.pytorch.optim.mask_creator_pruning module
- sparseml.pytorch.optim.mask_pruning module
- sparseml.pytorch.optim.mask_pruning_scorer module
- sparseml.pytorch.optim.modifier module
- sparseml.pytorch.optim.modifier_as module
- sparseml.pytorch.optim.modifier_distillation module
- sparseml.pytorch.optim.modifier_epoch module
- sparseml.pytorch.optim.modifier_lr module
- sparseml.pytorch.optim.modifier_params module
- sparseml.pytorch.optim.modifier_pruning module
- sparseml.pytorch.optim.modifier_quantization module
- sparseml.pytorch.optim.modifier_regularizer module
- sparseml.pytorch.optim.modifier_thinning module
- sparseml.pytorch.optim.optimizer module
- sparseml.pytorch.optim.sensitivity_as module
- sparseml.pytorch.optim.sensitivity_lr module
- sparseml.pytorch.optim.sensitivity_pruning module
- Module contents
- sparseml.pytorch.sparsification package
- sparseml.pytorch.utils package
- Subpackages
- Submodules
- sparseml.pytorch.utils.benchmarker module
- sparseml.pytorch.utils.callbacks module
- sparseml.pytorch.utils.exporter module
- sparseml.pytorch.utils.helpers module
- sparseml.pytorch.utils.logger module
- sparseml.pytorch.utils.loss module
- sparseml.pytorch.utils.mfac_helpers module
- sparseml.pytorch.utils.model module
- sparseml.pytorch.utils.module module
- sparseml.pytorch.utils.ssd_helpers module
- sparseml.pytorch.utils.yolo_helpers module
- Module contents
Submodules¶
sparseml.pytorch.base module¶
-
sparseml.pytorch.base.
check_torch_install
(min_version: Optional[str] = '1.0.0', max_version: Optional[str] = '1.9.100', raise_on_error: bool = True) → bool[source]¶ Check that the torch package is installed. If raise_on_error, will raise an ImportError if it is not installed or the required version range, if set, is not installed. If not raise_on_error, will return True if installed with required version and False otherwise.
- Parameters
min_version (str) – The minimum version for torch that it must be greater than or equal to, if unset will require no minimum version
max_version (str) – The maximum version for torch that it must be less than or equal to, if unset will require no maximum version.
raise_on_error (bool) – True to raise any issues such as not installed, minimum version, or maximum version as ImportError. False to return the result.
- Returns
If raise_on_error, will return False if torch is not installed or the version is outside the accepted bounds and True if everything is correct.
- Return type
bool
-
sparseml.pytorch.base.
check_torchvision_install
(min_version: Optional[str] = None, max_version: Optional[str] = None, raise_on_error: bool = True) → bool[source]¶ Check that the torchvision package is installed. If raise_on_error, will raise an ImportError if it is not installed or the required version range, if set, is not installed. If not raise_on_error, will return True if installed with required version and False otherwise.
- Parameters
min_version (str) – The minimum version for torchvision that it must be greater than or equal to, if unset will require no minimum version
max_version (str) – The maximum version for torchvision that it must be less than or equal to, if unset will require no maximum version.
raise_on_error (bool) – True to raise any issues such as not installed, minimum version, or maximum version as ImportError. False to return the result.
- Returns
If raise_on_error, will return False if torchvision is not installed or the version is outside the accepted bounds and True if everything is correct.
- Return type
bool
-
sparseml.pytorch.base.
require_torch
(min_version: Optional[str] = '1.0.0', max_version: Optional[str] = '1.9.100')[source]¶ Decorator function to require use of torch. Will check that torch package is installed and within the bounding ranges of min_version and max_version if they are set before calling the wrapped function. See
check_torch_install()
for more info.- Parameters
min_version (str) – The minimum version for torch that it must be greater than or equal to, if unset will require no minimum version
max_version (str) – The maximum version for torch that it must be less than or equal to, if unset will require no maximum version.
-
sparseml.pytorch.base.
require_torchvision
(min_version: Optional[str] = None, max_version: Optional[str] = None)[source]¶ Decorator function to require use of torchvision. Will check that torchvision package is installed and within the bounding ranges of min_version and max_version if they are set before calling the wrapped function. See
check_torchvision_install()
for more info.- Parameters
min_version (str) – The minimum version for torchvision that it must be greater than or equal to, if unset will require no minimum version
max_version (str) – The maximum version for torchvision that it must be less than or equal to, if unset will require no maximum version.
Module contents¶
Functionality for working with and sparsifying Models in the PyTorch framework