pow

# S3 method for tensor
^(x, y)

Arguments

x

tensor object

y

exponent (a tensor)

Examples

x <- tensor(c(1,2,3,4)) y <- tensor(2) x^y
#> tensor #> 1 #> 4 #> 9 #> 16 #> [ Variable[CPUFloatType]{4} ]
x^3
#> tensor #> 1 #> 8 #> 27 #> 64 #> [ Variable[CPUFloatType]{4} ]