Round
round(input, out=NULL) -> Tensor
Returns a new tensor with each of the elements of input
rounded
to the closest integer.
Examples
if (torch_is_installed()) {
a = torch_randn(c(4))
a
torch_round(a)
}
#> torch_tensor
#> 1
#> -1
#> 1
#> -1
#> [ CPUFloatType{4} ]