PyCharm 2024.3 Help

TensorBoard support

Before you start

  • Ensure that package Tensorboard is installed.

PyCharm provides support for integrating TensorBoard directly within Jupyter notebooks, enabling tracking and visualization of your machine learning experiments.

Enable TensorBoard

  1. Save your training metrics or logs using TensorFlow or PyTorch. For example:

    from torch.utils.tensorboard import SummaryWriter writer = SummaryWriter('runs/experiment_1') for i in range(10): writer.add_scalar('Loss/train', i * 0.1, i) writer.close()

    This example generates log files in the runs directory.

  2. Enable TensorBoard by adding the magic command %tensorboard in a notebook cell:

    %load_ext tensorboard %tensorboard --logdir=runs
    TensorBoard
Last modified: 16 December 2024