(self)
| 493 | |
| 494 | def _test_trace(use_placeholder, shapes_info, dtype): |
| 495 | def test_trace(self): |
| 496 | with self.session(graph=ops.Graph()) as sess: |
| 497 | sess.graph.seed = random_seed.DEFAULT_GRAPH_SEED |
| 498 | operator, mat = self.operator_and_matrix( |
| 499 | shapes_info, dtype, use_placeholder=use_placeholder) |
| 500 | op_trace = operator.trace() |
| 501 | mat_trace = math_ops.trace(mat) |
| 502 | if not use_placeholder: |
| 503 | self.assertAllEqual(op_trace.shape, mat_trace.shape) |
| 504 | op_trace_v, mat_trace_v = sess.run([op_trace, mat_trace]) |
| 505 | self.assertAC(op_trace_v, mat_trace_v) |
| 506 | return test_trace |
| 507 | |
| 508 |
nothing calls this directly
no test coverage detected