torch_iinfo() is failing for dtypes torch_uint8() and torch_int8(). This is usefull for {torchvision} where torch images are expected to be converted to uint8() before display.
ReprEx
# correct output
torch::torch_iinfo(torch::torch_int16())
#> $bits
#> [1] 16
#>
#> $max
#> [1] 32767
#>
#> $min
#> [1] -32768
# dtypes under issue
torch::torch_iinfo(torch::torch_uint8())
#> Error in `value_error()`:
#> ! dtype must be an integer type.
torch::torch_iinfo(torch::torch_int8())
#> Error in `value_error()`:
#> ! dtype must be an integer type.
Hello,
torch_iinfo()
is failing for dtypestorch_uint8()
andtorch_int8()
. This is usefull for {torchvision} where torch images are expected to be converted to uint8() before display.ReprEx
Created on 2024-09-03 with reprex v2.1.1