(self)
| 404 | self.assertEqual(t.gradient(z, x2).numpy(), 4.0) |
| 405 | |
| 406 | def testTapeReset(self): |
| 407 | with backprop.GradientTape() as t: |
| 408 | v = resource_variable_ops.ResourceVariable(1.0) |
| 409 | loss = v * v |
| 410 | t.reset() |
| 411 | loss += v * v |
| 412 | self.assertAllEqual(t.gradient(loss, v), 2.0) |
| 413 | |
| 414 | def testPythonMax(self): |
| 415 | x = [resource_variable_ops.ResourceVariable(2.), |
nothing calls this directly
no test coverage detected