Skip to content

Commit 25fc952

Browse files
authored
🐞 Fix EfficientAD's pretrained weigths load path (#1966)
Fix EfficientAD's pretrained weigths load path to be identical to downloaded path
1 parent e077b1e commit 25fc952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/anomalib/models/image/efficient_ad/lightning_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def prepare_pretrained_model(self) -> None:
9393
if not (pretrained_models_dir / "efficientad_pretrained_weights").is_dir():
9494
download_and_extract(pretrained_models_dir, WEIGHTS_DOWNLOAD_INFO)
9595
teacher_path = (
96-
pretrained_models_dir / "efficientad_pretrained_weights" / f"pretrained_teacher_{self.model_size}.pth"
96+
pretrained_models_dir / "efficientad_pretrained_weights" / f"pretrained_teacher_{self.model_size.value}.pth"
9797
)
9898
logger.info(f"Load pretrained teacher model from {teacher_path}")
9999
self.model.teacher.load_state_dict(torch.load(teacher_path, map_location=torch.device(self.device)))

0 commit comments

Comments
 (0)