Skip to content

Commit 26ff5be

Browse files
committed
change x.device to self.device
1 parent 919c84d commit 26ff5be

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/deepforest/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ def forward(self, x, metadata=None):
522522
else:
523523
meta_dim = self.classifier.in_features - image_features.shape[1]
524524
meta_features = torch.zeros(
525-
x.shape[0], meta_dim, device=x.device, dtype=x.dtype
525+
x.shape[0], meta_dim, device=self.device, dtype=x.dtype
526526
)
527527
combined = torch.cat([image_features, meta_features], dim=1)
528528
return self.classifier(combined)

0 commit comments

Comments
 (0)