Closed sebffischer closed 2 months ago
Hello @sebffischer,
When angle = 0
I guess the transform is the identity, so no change in values nor shape is expected...
I gess expand works as expected when angle != 0
library(torchvision)
library(torch)
x = torch_randn(1, 3, 200, 150)
transform_rotate(x, angle = 6, expand = TRUE)$shape
#> [1] 1 3 166 166
transform_rotate(x, angle = 6, expand = FALSE)$shape
#> [1] 1 3 150 150
Created on 2024-08-31 with reprex v2.1.1
Could you be more explicit on your expectation ?
my question is why the shape is not c(1, 3, 200, 150)
afterwards
You're right sorry, I didn't see the difference bw H and W dimensions. I've proposed a P.R. to fix it.
Maybe I don't fully understand the
transform_rotate()
function, but below it yields a (for me) unexpected output shape.Created on 2023-10-25 with reprex v2.0.2