Record the actual summary and return True.
()
| 628 | serialized_metadata = metadata |
| 629 | |
| 630 | def record(): |
| 631 | """Record the actual summary and return True.""" |
| 632 | # Note the identity to move the tensor to the CPU. |
| 633 | with ops.device("cpu:0"): |
| 634 | write_summary_op = gen_summary_ops.write_summary( |
| 635 | context.context().summary_writer._resource, # pylint: disable=protected-access |
| 636 | step, |
| 637 | array_ops.identity(tensor), |
| 638 | tag, |
| 639 | serialized_metadata, |
| 640 | name=scope) |
| 641 | with ops.control_dependencies([write_summary_op]): |
| 642 | return constant_op.constant(True) |
| 643 | |
| 644 | with ops.device("cpu:0"): |
| 645 | op = smart_cond.smart_cond( |
nothing calls this directly
no test coverage detected