From 8de77f9afd012c5ac12a23f95fbb6816668914c3 Mon Sep 17 00:00:00 2001 From: olasaadi Date: Mon, 30 May 2022 11:52:47 +0300 Subject: [PATCH] update --- apt/utils/models/pytorch_model.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apt/utils/models/pytorch_model.py b/apt/utils/models/pytorch_model.py index ef64006..b1d99ca 100644 --- a/apt/utils/models/pytorch_model.py +++ b/apt/utils/models/pytorch_model.py @@ -152,9 +152,17 @@ class PyTorchClassifierWrapper(ArtPyTorchClassifier): self._optimizer.load_state_dict(checkpoint['opt_state_dict']) def load_latest_checkpoint(self): + """ + Load model only based on the check point path (latest.tar) + :return: loaded model + """ self.load_checkpoint_by_path('latest.tar') def load_best_checkpoint(self): + """ + Load model only based on the check point path (model_best.tar) + :return: loaded model + """ self.load_checkpoint_by_path('model_best.tar')