Skip to content

Commit

Permalink
These lines overwrite the device argument of the function, renderin…
Browse files Browse the repository at this point in the history
…g it useless.
  • Loading branch information
jjhbw committed Jun 28, 2022
1 parent aec40d8 commit 73d5c90
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions HIPT_4K/hipt_model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def get_vit256(pretrained_weights, arch='vit_small', device=torch.device('cuda:0
"""

checkpoint_key = 'teacher'
device = torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu")
model256 = vits.__dict__[arch](patch_size=16, num_classes=0)
for p in model256.parameters():
p.requires_grad = False
Expand Down Expand Up @@ -68,7 +67,6 @@ def get_vit4k(pretrained_weights, arch='vit4k_xs', device=torch.device('cuda:1')
"""

checkpoint_key = 'teacher'
device = torch.device("cuda:1") if torch.cuda.is_available() else torch.device("cpu")
model4k = vits4k.__dict__[arch](num_classes=0)
for p in model4k.parameters():
p.requires_grad = False
Expand Down

0 comments on commit 73d5c90

Please sign in to comment.