MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / g

Method g

tensorflow/python/kernel_tests/cwise_ops_unary_test.py:575–579  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

573 return math_ops.abs(math_ops.complex(real, imag))
574
575 def g(x):
576 with backprop.GradientTape() as t:
577 t.watch(x)
578 y = f(x)
579 return t.gradient(y, x)
580
581 err = gradient_checker_v2.max_error(
582 *gradient_checker_v2.compute_gradient(g, [ops.convert_to_tensor(2.0)]))

Callers

nothing calls this directly

Calls 4

gradientMethod · 0.80
fFunction · 0.50
GradientTapeMethod · 0.45
watchMethod · 0.45

Tested by

no test coverage detected