Writes an audio summary if possible.
(name, tensor, sample_rate, max_outputs, family=None, step=None)
| 821 | |
| 822 | |
| 823 | def audio(name, tensor, sample_rate, max_outputs, family=None, step=None): |
| 824 | """Writes an audio summary if possible.""" |
| 825 | |
| 826 | def function(tag, scope): |
| 827 | # Note the identity to move the tensor to the CPU. |
| 828 | return gen_summary_ops.write_audio_summary( |
| 829 | context.context().summary_writer._resource, # pylint: disable=protected-access |
| 830 | _choose_step(step), |
| 831 | tag, |
| 832 | array_ops.identity(tensor), |
| 833 | sample_rate=sample_rate, |
| 834 | max_outputs=max_outputs, |
| 835 | name=scope) |
| 836 | |
| 837 | return summary_writer_function(name, tensor, function, family=family) |
| 838 | |
| 839 | |
| 840 | def graph(param, step=None, name=None): |
nothing calls this directly
no test coverage detected