logo
Browse Source

Avoid auto download given local checkpoint path

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 1 year ago
parent
commit
c1927bd7cb
  1. 2
      timm_image.py

2
timm_image.py

@ -58,7 +58,7 @@ class Model:
self.device = device
if checkpoint_path:
assert os.path.exists(checkpoint_path), f'File not found: {checkpoint_path}'
self.model = create_model(model_name, checkpoint_path, num_classes=num_classes)
self.model = create_model(model_name, pretrained=False, checkpoint_path=checkpoint_path, num_classes=num_classes)
else:
self.model = create_model(model_name, pretrained=True, num_classes=num_classes)
self.model.eval()

Loading…
Cancel
Save