Skip to content

Commit 28fd05e

Browse files
Leon Dongfacebook-github-bot
authored andcommitted
Revert rotated boxes change
Summary: Previous change (D64119684) broke a test T204260403. This diff reverts the change and ensures that the detector model still works. Reviewed By: srihari2761 Differential Revision: D64198984 fbshipit-source-id: eb4e509fd74dabe2bbb2bb39e3a45f06b9cfb71c
1 parent 20a6625 commit 28fd05e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

detectron2/structures/rotated_boxes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright (c) Facebook, Inc. and its affiliates.
22
import math
3-
from typing import Any, List, Tuple
3+
from typing import List, Tuple
44
import torch
55

66
from detectron2.layers.rotated_boxes import pairwise_iou_rotated
@@ -229,9 +229,9 @@ def clone(self) -> "RotatedBoxes":
229229
"""
230230
return RotatedBoxes(self.tensor.clone())
231231

232-
def to(self, device: torch.device, *args: Any, **kwargs: Any):
232+
def to(self, device: torch.device, non_blocking: bool = False):
233233
# Boxes are assumed float32 and does not support to(dtype)
234-
return RotatedBoxes(self.tensor.to(device=device))
234+
return RotatedBoxes(self.tensor.to(device=device, non_blocking=non_blocking))
235235

236236
def area(self) -> torch.Tensor:
237237
"""

0 commit comments

Comments
 (0)