Skip to content

Commit 4ba14c6

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] remove center unsetting if expand=True (#7715)
Reviewed By: vmoens Differential Revision: D47186565 fbshipit-source-id: 47318e0c951cece0a9a5f6085b3eceaf5a986d59
1 parent d5276bf commit 4ba14c6

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

torchvision/transforms/v2/functional/_geometry.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,6 @@ def rotate_image_pil(
921921

922922
if center is not None and expand:
923923
warnings.warn("The provided center argument has no effect on the result if expand is True")
924-
center = None
925924

926925
return _FP.rotate(
927926
image, angle, interpolation=pil_modes_mapping[interpolation], expand=expand, fill=fill, center=center
@@ -938,7 +937,6 @@ def rotate_bounding_box(
938937
) -> Tuple[torch.Tensor, Tuple[int, int]]:
939938
if center is not None and expand:
940939
warnings.warn("The provided center argument has no effect on the result if expand is True")
941-
center = None
942940

943941
return _affine_bounding_box_with_expand(
944942
bounding_box,

0 commit comments

Comments
 (0)