TensorBoard: Visualization Toolkit for ML
When to Use This Skill
Use TensorBoard when you need to:
- Visualize training metrics like loss and accuracy over time
- Debug models with histograms and distributions
- Compare experiments across multiple runs
- Visualize model graphs and architecture
- Project embeddings to lower dimensions (t-SNE, PCA)
- Track hyperparameter experiments
- Profile performance and identify bottlenecks
- Visualize images and text during training
Users: 20M+ downloads/year | GitHub Stars: 27k+ | License: Apache 2.0
Installation
Quick Start
PyTorch
TensorFlow/Keras
Core Concepts
1. SummaryWriter (PyTorch)
2. Logging Scalars
3. Logging Multiple Scalars
4. Logging Images
5. Logging Histograms
6. Logging Model Graph
Advanced Features
Embedding Projector
Visualize high-dimensional data (embeddings, features) in 2D/3D.
In TensorBoard:
- Navigate to "Projector" tab
- Choose PCA, t-SNE, or UMAP visualization
- Search, filter, and explore clusters
Hyperparameter Tuning
Text Logging
PR Curves
Precision-Recall curves for classification.
Integration Examples
PyTorch Training Loop
TensorFlow/Keras Training
Comparing Experiments
Multiple Runs
In TensorBoard:
- All runs appear in the same dashboard
- Toggle runs on/off for comparison
- Use regex to filter run names
- Overlay charts to compare metrics
Organizing Experiments
Best Practices
1. Use Descriptive Run Names
2. Group Related Metrics
3. Log Regularly but Not Too Often
4. Close Writer When Done
5. Use Separate Writers for Train/Val
Performance Profiling
TensorFlow Profiler
PyTorch Profiler
Resources
- Documentation: https://www.tensorflow.org/tensorboard
- PyTorch Integration: https://pytorch.org/docs/stable/tensorboard.html
- GitHub: https://github.com/tensorflow/tensorboard (27k+ stars)
- TensorBoard.dev: https://tensorboard.dev (share experiments publicly)
See Also
references/visualization.md- Comprehensive visualization guidereferences/profiling.md- Performance profiling patternsreferences/integrations.md- Framework-specific integration examples

