Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tensorboard resume training plot

I ran a reinforcement learning training script which used Pytorch and logged data to tensorboardX and saved checkpoints. Now I want to continue training. How do I tell tensorboardX to continue from where I left off? Thank you!

like image 637
Ankur Deka Avatar asked Jun 23 '26 12:06

Ankur Deka


1 Answers

I figured out how to continue the training plot. While creating the summarywriter, we need to provide the same log_dir that we used while training the first time.

from tensorboardX import SummaryWriter
writer = SummaryWriter('log_dir')

Then inside the training loop step needs to start from where it left (not from 0):

writer.add_scalar('average reward',rewards.mean(),step)
like image 169
Ankur Deka Avatar answered Jun 26 '26 18:06

Ankur Deka