Enable visualizations for TensorBoard.

Inherits From: Callback

Used in the notebooks

Used in the guide Used in the tutorials

TensorBoard is a visualization tool provided with TensorFlow.

This callback logs events for TensorBoard, including:

  • Metrics summary plots
  • Training graph visualization
  • Activation histograms
  • Sampled profiling

If you have installed TensorFlow with pip, you should be able to launch TensorBoard from the command line:

tensorboard --logdir=path_to_your_logs

You can find more information about TensorBoard here.

Example (Basic):

tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir="./logs"), y_train, epochs=2, callbacks=[tensorboard_callback])
# run the tensorboard command to view the visualizations.

Example (Profile):

# profile a single batch, e.g. the 5th batch.
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir='