Calculates:
output = input >= 0 || fract(other) != 0 ? pow(input, other) : pow(-input, other) * ((i32(other) & 1) != 0 ? -1f : 1f) Copy
output = input >= 0 || fract(other) != 0 ? pow(input, other) : pow(-input, other) * ((i32(other) & 1) != 0 ? -1f : 1f)
Gradient:
inputGrad = input >= 0 || fract(other) != 0 ? outputGrad * other * pow(input, other - 1.0) : outputGrad * other * pow(-input, other - 1) * ((i32(other - 1) & 1) != 0 ? -1f : 1f); otherGrad = outputGrad * pow(input, other) * log(input) Copy
inputGrad = input >= 0 || fract(other) != 0 ? outputGrad * other * pow(input, other - 1.0) : outputGrad * other * pow(-input, other - 1) * ((i32(other - 1) & 1) != 0 ? -1f : 1f); otherGrad = outputGrad * pow(input, other) * log(input)
the input tensor of any shape
the other tensor whose shape is broadcastable with the input tensor
the output tensor
Generated using TypeDoc
Calculates:
Gradient: