C.W.K.
Stream
Lesson 01 of 04 · published

TensorBoard Overview — Eight Dashboards

~10 min · tensorboard, visualization, monitoring

Level 0Level 0
0 XP0/78 lessons0/17 achievements
0/100 XP to next level100 XP to go0% complete

The window into what your model is doing

TensorBoard is TF's visualization suite — a browser dashboard that turns the opaque process of neural network training into a visual story. Instrument training to write event files to a log directory, then launch TensorBoard to explore interactively.

TF 2.21 change: TensorBoard is no longer bundled with TF. Install separately: pip install tensorboard. Launch with tensorboard --logdir logs/ and open http://localhost:6006.

The dashboards you'll use:

  • Scalars — loss, accuracy, LR over steps. The first thing you'll look at.
  • Graphs — visualize the model architecture, debug shapes
  • Histograms — weight/gradient distributions over time, spot dead neurons
  • Images — sample images, attention maps, heatmaps
  • Projector — embedding visualization (PCA, t-SNE, UMAP)
  • Profile — GPU/TPU utilization, op timing, input pipeline analysis
  • HParams — hyperparameter sweep comparisons
  • What-If Tool — model fairness, counterfactuals, slice analysis

Code

Keras callback으로 TensorBoard·python
import tensorflow as tf
import datetime

log_dir = "logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")

tensorboard_cb = tf.keras.callbacks.TensorBoard(
    log_dir=log_dir,
    histogram_freq=1,        # log weight histograms every epoch
    write_graph=True,        # log model architecture graph
    write_images=False,      # log weight images (expensive)
    update_freq='epoch',     # 'epoch' or 'batch'
    profile_batch='5, 10',   # profile batches 5-10 for performance
)

model.fit(train_ds, validation_data=val_ds, epochs=50,
          callbacks=[tensorboard_cb])
Launch TensorBoard·bash
# Terminal
tensorboard --logdir logs/
# Open http://localhost:6006

# Jupyter / Colab
%load_ext tensorboard
%tensorboard --logdir logs/

External links

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.