The SummaryWriter class is the primary interface for writing TensorBoard events. It supports various summary types including scalar, image, figure, histogram, audio, text, graph, onnx_graph, embedding, pr_curve, mesh, hyper-parameters, and video.
Key usage patterns:
- Data Grouping: Use forward slashes (
/) in tag names to group data in the TensorBoard UI (e.g., 'data/scalar1'). - Multiple Scalars: Use
add_scalars to plot multiple series in the same chart. - Audio Requirements: When using
add_audio(), ensure the audio amplitude is within the range [-1, 1] and install soundfile for optimal performance. - PR Curves:
add_pr_curve requires TensorBoard version 0.4RC or later.