Skip to content

Instantly share code, notes, and snippets.

@gerritgr
Created September 13, 2022 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerritgr/88cf7914adbb551e091311a11c85fc94 to your computer and use it in GitHub Desktop.
Save gerritgr/88cf7914adbb551e091311a11c85fc94 to your computer and use it in GitHub Desktop.
!pip install tensorboard
##
from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter('runs/molecules')
##
writer.add_scalar("Loss/train", 3.0, 1)
writer.add_scalar("Loss/train", 2.0, 2)
writer.add_scalar("Loss/train", 1.5, 3)
writer.flush()
writer.close()
###
%load_ext tensorboard
%tensorboard --logdir runs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment