R/gen-namespace-docs.R
R/gen-namespace-examples.R
R/gen-namespace.R
torch_round.Rd
Round
torch_round(self)
(Tensor) the input tensor.
Returns a new tensor with each of the elements of input rounded to the closest integer.
input
if (torch_is_installed()) { a = torch_randn(c(4)) a torch_round(a) } #> torch_tensor #> 0 #> 1 #> 1 #> -1 #> [ CPUFloatType{4} ]