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

Method grad

tensorflow/python/kernel_tests/relu_op_test.py:132–136  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

130 def testGradientFloat16(self):
131
132 def grad(x):
133 with backprop.GradientTape() as tape:
134 tape.watch(x)
135 y = nn_ops.l2_loss(nn_ops.relu(x))
136 return tape.gradient(y, x)
137
138 def f():
139 with test_util.use_gpu():

Calls 3

gradientMethod · 0.80
GradientTapeMethod · 0.45
watchMethod · 0.45

Tested by

no test coverage detected