anomalib.utils.callbacks.model_loader¶
Callback that loads model weights from the state dict.
Module Contents¶
Classes¶
Callback that loads the model weights from the state dict. |
Attributes¶
- class anomalib.utils.callbacks.model_loader.LoadModelCallback(weights_path)[source]¶
Bases:
pytorch_lightning.CallbackCallback that loads the model weights from the state dict.
- on_test_start(_trainer, pl_module: anomalib.models.components.AnomalyModule) None[source]¶
Call when the test begins.
Loads the model weights from
weights_pathinto the PyTorch module.
- on_predict_start(_trainer, pl_module: anomalib.models.components.AnomalyModule) None[source]¶
Call when inference begins.
Loads the model weights from
weights_pathinto the PyTorch module.