Skip to content

Commit

Permalink
fix torchscript complaint
Browse files Browse the repository at this point in the history
  • Loading branch information
gau-nernst committed Dec 2, 2024
1 parent 7fd7206 commit d06f5e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timm/models/swin_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def get_attn_mask(self, x: Optional[torch.Tensor] = None) -> Optional[torch.Tens
dtype = x.dtype
else:
H, W = self.input_resolution
device = "cpu"
device = torch.device("cpu")
dtype = None
H = math.ceil(H / self.window_size[0]) * self.window_size[0]
W = math.ceil(W / self.window_size[1]) * self.window_size[1]
Expand Down

0 comments on commit d06f5e8

Please sign in to comment.