Skip to content

Commit

Permalink
Revert rotated boxes change
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Leon Dong authored and facebook-github-bot committed Oct 11, 2024
1 parent 20a6625 commit 28fd05e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions detectron2/structures/rotated_boxes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates.
import math
from typing import Any, List, Tuple
from typing import List, Tuple
import torch

from detectron2.layers.rotated_boxes import pairwise_iou_rotated
Expand Down Expand Up @@ -229,9 +229,9 @@ def clone(self) -> "RotatedBoxes":
"""
return RotatedBoxes(self.tensor.clone())

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

def area(self) -> torch.Tensor:
"""
Expand Down

0 comments on commit 28fd05e

Please sign in to comment.