torchvision icon indicating copy to clipboard operation
torchvision copied to clipboard

transform_rotate changes shape of input

Open sebffischer opened this issue 1 year ago • 0 comments

Maybe I don't fully understand the transform_rotate() function, but below it yields a (for me) unexpected output shape.

library(torchvision)
library(torch)
#> Warning: package 'torch' was built under R version 4.3.1

x = torch_randn(1, 3, 200, 150)

transform_rotate(x, angle = 0, expand = TRUE)$shape
#> [1]   1   3 150 150
transform_rotate(x, angle = 0, expand = FALSE)$shape
#> [1]   1   3 150 150

Created on 2023-10-25 with reprex v2.0.2

sebffischer avatar Oct 25 '23 13:10 sebffischer