R/gen-namespace-docs.R
R/gen-namespace-examples.R
R/gen-namespace.R
torch_trunc.Rd
Trunc
torch_trunc(self)
(Tensor) the input tensor.
Returns a new tensor with the truncated integer values of the elements of input.
input
if (torch_is_installed()) { a = torch_randn(c(4)) a torch_trunc(a) } #> torch_tensor #> 0 #> -0 #> 0 #> 1 #> [ CPUFloatType{4} ]