Skip to content

Commit 84c9e2b

Browse files
committed
mypy fix - .to should not be called if np.array
Signed-off-by: Kieran Fraser <[email protected]>
1 parent 3a97e66 commit 84c9e2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/estimators/object_detection/pytorch_detection_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def _get_losses(
299299
y_tensor = y # type: ignore
300300

301301
x_preprocessed, y_preprocessed = self._apply_preprocessing(
302-
x.to(self.device), y=y_tensor, fit=False, no_grad=True
302+
x, y=y_tensor, fit=False, no_grad=True
303303
)
304304

305305
if self.clip_values is not None:

0 commit comments

Comments
 (0)