File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
torchvision/transforms/v2/functional Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -832,10 +832,10 @@ def rotate_image_tensor(
832
832
center_f = [0.0 , 0.0 ]
833
833
if center is not None :
834
834
if expand :
835
+ # TODO: Do we actually want to warn, or just document this?
835
836
warnings .warn ("The provided center argument has no effect on the result if expand is True" )
836
- else :
837
- # Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center.
838
- center_f = [(c - s * 0.5 ) for c , s in zip (center , [width , height ])]
837
+ # Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center.
838
+ center_f = [(c - s * 0.5 ) for c , s in zip (center , [width , height ])]
839
839
840
840
# due to current incoherence of rotation angle direction between affine and rotate implementations
841
841
# we need to set -angle.
You can’t perform that action at this time.
0 commit comments