Skip to content

Commit 69f32ff

Browse files
authored
Move model's object to a correct device (#172)
Co-authored-by: Ilya Isaev <[email protected]>
1 parent 6616f24 commit 69f32ff

File tree

1 file changed

+1
-1
lines changed
  • s3torchbenchmarking/src/s3torchbenchmarking

1 file changed

+1
-1
lines changed

s3torchbenchmarking/src/s3torchbenchmarking/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __init__(self, num_labels: int, checkpoint: DictConfig):
102102
def model(self):
103103
return ViTForImageClassification.from_pretrained(
104104
"google/vit-base-patch16-224-in21k", num_labels=self.num_labels
105-
)
105+
).to(self.device)
106106

107107
@cached_property
108108
def transform(self):

0 commit comments

Comments
 (0)