R/tensor.R
tch_trunc.Rd
Returns a new tensor with the truncated integer values of the elements of x.
tch_trunc(x)
tensor object
x <- tensor(array(runif(8), dim = c(2,2,2))) tch_trunc(x)#> tensor #> (1,.,.) = #> 0 0 #> 0 0 #> #> (2,.,.) = #> 0 0 #> 0 0 #> [ Variable[CPUFloatType]{2,2,2} ]