(self, experimental_use_pfor)
| 1385 | class JacobianTest(test.TestCase): |
| 1386 | |
| 1387 | def _jacobian(self, experimental_use_pfor): |
| 1388 | persistent = context.executing_eagerly and not experimental_use_pfor |
| 1389 | with backprop.GradientTape(persistent=persistent) as g: |
| 1390 | x = constant_op.constant([1., 2.]) |
| 1391 | y = constant_op.constant([3., 4.]) |
| 1392 | g.watch(x) |
| 1393 | g.watch(y) |
| 1394 | z = x * x * y |
| 1395 | jacobian = g.jacobian(z, [x, y], |
| 1396 | experimental_use_pfor=experimental_use_pfor) |
| 1397 | answer = [array_ops.diag(2 * x * y), array_ops.diag(x * x)] |
| 1398 | return jacobian, answer |
| 1399 | |
| 1400 | @test_util.run_v1_only('b/120545219') |
| 1401 | def testPfor(self): |
no test coverage detected