apply Black 25.11.0 style in fbcode/deeplearning/projects (21/92)
Summary: Formats the covered files with pyfmt. paintitblack Reviewed By: itamaro Differential Revision: D90476315 fbshipit-source-id: ee94c471788b8e7d067813d8b3e0311214d17f3f
This commit is contained in:
committed by
meta-codesync[bot]
parent
7b89b8fc3f
commit
11dec2936d
@@ -84,9 +84,9 @@ class BoxMode(IntEnum):
|
||||
], "Relative mode not yet supported!"
|
||||
|
||||
if from_mode == BoxMode.XYWHA_ABS and to_mode == BoxMode.XYXY_ABS:
|
||||
assert (
|
||||
arr.shape[-1] == 5
|
||||
), "The last dimension of input shape must be 5 for XYWHA format"
|
||||
assert arr.shape[-1] == 5, (
|
||||
"The last dimension of input shape must be 5 for XYWHA format"
|
||||
)
|
||||
original_dtype = arr.dtype
|
||||
arr = arr.double()
|
||||
|
||||
@@ -244,9 +244,9 @@ class Boxes:
|
||||
if isinstance(item, int):
|
||||
return Boxes(self.tensor[item].view(1, -1))
|
||||
b = self.tensor[item]
|
||||
assert (
|
||||
b.dim() == 2
|
||||
), "Indexing on Boxes with {} failed to return a matrix!".format(item)
|
||||
assert b.dim() == 2, (
|
||||
"Indexing on Boxes with {} failed to return a matrix!".format(item)
|
||||
)
|
||||
return Boxes(b)
|
||||
|
||||
def __len__(self) -> int:
|
||||
@@ -425,7 +425,7 @@ def matched_pairwise_iou(boxes1: Boxes, boxes2: Boxes) -> torch.Tensor:
|
||||
Tensor: iou, sized [N].
|
||||
"""
|
||||
assert len(boxes1) == len(boxes2), (
|
||||
"boxlists should have the same" "number of entries, got {}, {}".format(
|
||||
"boxlists should have the samenumber of entries, got {}, {}".format(
|
||||
len(boxes1), len(boxes2)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user