Returns a new tensor with the tangent of the elements of input.

tch_tan(x)

Arguments

x

tensor object

Examples

x <- tensor(array(runif(8), dim = c(2,2,2))) tch_tan(x)
#> tensor #> (1,.,.) = #> 0.4911 0.7130 #> 0.6906 0.4553 #> #> (2,.,.) = #> 0.1261 1.1180 #> 1.0865 0.9683 #> [ Variable[CPUFloatType]{2,2,2} ]