torchvision
torchvision copied to clipboard
transform_rotate changes shape of input
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