Calculates:
output = other >= 0 ? abs(input) : -abs(input) Copy
output = other >= 0 ? abs(input) : -abs(input)
Gradient:
var dir = other >= 0 ? (input >= 0 ? 1.0 : -1.0) : (input >= 0 ? -1.0 : 1.0); inputGrad = input == 0.0 ? 0.0 : outputGrad * dir; otherGrad = 0 Copy
var dir = other >= 0 ? (input >= 0 ? 1.0 : -1.0) : (input >= 0 ? -1.0 : 1.0); inputGrad = input == 0.0 ? 0.0 : outputGrad * dir; otherGrad = 0
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: