def METHOD_NAME(self):
    torch.manual_seed(132)
    box_head_output_size = 8
    box_predictor = RotatedFastRCNNOutputLayers(
        ShapeSpec(channels=box_head_output_size),
        box2box_transform=Box2BoxTransformRotated(weights=(10, 10, 5, 5, 1)),
        num_classes=5,
    )
    feature_pooled = torch.rand(2, box_head_output_size)
    predictions = box_predictor(feature_pooled)
    proposal_boxes = torch.tensor(
        [[2, 1.95, 2.4, 1.7, 0], [4.65, 5.25, 4.7, 5.5, 0]], dtype=torch.float32
    )
    gt_boxes = torch.tensor([[2, 2, 2, 2, 0], [4, 4, 4, 4, 0]], dtype=torch.float32)
    proposal = Instances((10, 10))
    proposal.proposal_boxes = RotatedBoxes(proposal_boxes)
    proposal.gt_boxes = RotatedBoxes(gt_boxes)
    proposal.gt_classes = torch.tensor([1, 2])
    with EventStorage():  # capture events in a new storage to discard them
        losses = box_predictor.losses(predictions, [proposal])
    # Note: the expected losses are slightly different even if
    # the boxes are essentially the same as in the FastRCNNOutput test, because
    # bbox_pred in FastRCNNOutputLayers have different Linear layers/initialization
    # between the two cases.
    expected_losses = {
        "loss_cls": torch.tensor(1.7920907736),
        "loss_box_reg": torch.tensor(4.0410838127),
    }
    for name in expected_losses.keys():
        assert torch.allclose(losses[name], expected_losses[name])