def model(a): with tape_lib.GradientTape() as tape: tape.watch(a) result = unified_math_ops.neg(a) grads = tape.gradient(result, a) return grads
def model(a): return unified_math_ops.neg(a)