def func_cat(x: torch.Tensor): boxes1 = RotatedBoxes(x) boxes2 = RotatedBoxes(x) # this is not supported by torchscript for now. # boxes3 = RotatedBoxes.cat([boxes1, boxes2]) boxes3 = boxes1.cat([boxes1, boxes2]) return boxes3
def test_empty_cat(self): x = RotatedBoxes.cat([]) self.assertTrue(x.tensor.shape, (0, 5))