Returns a new tensor with the reciprocal of the square-root of each of the elements of x: 1/sqrt(x).

tch_rsqrt(x)

Arguments

x

tensor object

Examples

x <- tensor(matrix(runif(6), nrow = 3)) tch_rsqrt(x)
#> tensor #> 2.1305 4.7890 #> 1.8519 1.4068 #> 1.1091 2.0342 #> [ Variable[CPUFloatType]{3,2} ]