mlverse / torchvision

R interface to torchvision
https://torchvision.mlverse.org
Other
63 stars 15 forks source link

torch random rotation gives a missing value error #96

Closed MCodrescu closed 1 year ago

MCodrescu commented 1 year ago
# Example Image
x <- torch::torch_tensor(array(1, dim = c(3, 200, 200)))

# Transforms
rotate <- function(img) torchvision::transform_random_rotation(img, 20)

rotate(x)
#> Error in if (mode == "bilinear") {: missing value where TRUE/FALSE needed

Created on 2023-07-07 with reprex v2.0.2

dfalbel commented 1 year ago

Thanks for reporting @MCodrescu. Will be fixed with the linked PR.