From 0c0ea5eb956f9de50bbaabd734b34b559fc192cb Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 3 Jul 2023 12:01:22 +0200 Subject: [PATCH] remove center unsetting if expand=True --- torchvision/transforms/v2/functional/_geometry.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/torchvision/transforms/v2/functional/_geometry.py b/torchvision/transforms/v2/functional/_geometry.py index 1d298ff914d..e1dd2866bc5 100644 --- a/torchvision/transforms/v2/functional/_geometry.py +++ b/torchvision/transforms/v2/functional/_geometry.py @@ -921,7 +921,6 @@ def rotate_image_pil( if center is not None and expand: warnings.warn("The provided center argument has no effect on the result if expand is True") - center = None return _FP.rotate( image, angle, interpolation=pil_modes_mapping[interpolation], expand=expand, fill=fill, center=center @@ -938,7 +937,6 @@ def rotate_bounding_box( ) -> Tuple[torch.Tensor, Tuple[int, int]]: if center is not None and expand: warnings.warn("The provided center argument has no effect on the result if expand is True") - center = None return _affine_bounding_box_with_expand( bounding_box,