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
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.Enable TensorBoard by adding the magic command
%tensorboard
in a notebook cell:%load_ext tensorboard %tensorboard --logdir=runs
Last modified: 16 December 2024