R/tensor.R
tch_sum.Rd
sum
tch_sum(x, dim = NULL, keepdim = FALSE)
tensor object
dimension in which to sum
wether to keep or not the dim
optionaly cast the sum result
x <- tensor(1:10) tch_sum(x)#> tensor #> 55 #> [ Variable[CPULongType]{} ]