R/tensor.R
tch_round.Rd
Returns a new tensor with each of the elements of x rounded to the closest integer.
tch_round(x)
tensor object
x <- tensor(matrix(runif(6), nrow = 3)) tch_round(x)#> tensor #> 1 1 #> 0 1 #> 0 1 #> [ Variable[CPUFloatType]{3,2} ]