Skip to content

Commit

Permalink
fix typing issue in dinov2 test
Browse files Browse the repository at this point in the history
  • Loading branch information
catwell committed Sep 18, 2024
1 parent 336253f commit 73089a4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/foundationals/dinov2/test_dinov2.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ def ref_model(
if "reg" not in flavor:
kwargs["interpolate_offset"] = 0.0

model = torch.hub.load( # type: ignore
model: torch.nn.Module = torch.hub.load( # type: ignore
model=flavor,
repo_or_dir=str(dinov2_repo_path),
source="local",
pretrained=False, # to turn off automatic weights download (see load_state_dict below)
**kwargs,
).to(device=test_device)
)
model = model.to(device=test_device)

flavor = flavor.replace("_reg", "_reg4")
weights = test_weights_path / f"{flavor}_pretrain.pth"
Expand Down

0 comments on commit 73089a4

Please sign in to comment.