Skip to content

Commit eb18751

Browse files
author
xhlulu
committed
Change torchhub directory
Former-commit-id: 697c085
1 parent f8e4e35 commit eb18751

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/dash-dino/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def apply_threshold(attentions, w_featmap, h_featmap, threshold, patch_size=16):
6868
default_url = "https://dl.fbaipublicfiles.com/dino/img.png"
6969

7070
# Load model
71+
torch.hub.set_dir("./")
7172
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
7273
print("Running on", device)
7374
model = torch.hub.load("facebookresearch/dino:main", "dino_deits16").to(device)

0 commit comments

Comments
 (0)