Skip to content

Multiple plot with TensorboardStatsHandler for train and validation curves #2609

Answered by o-fares
o-fares asked this question in Q&A
Discussion options

You must be logged in to vote

Fixed it by saving tensorboard events to two different directories and passing them as SummaryWriter:

writer_1 = SummaryWriter(tensorboard_logdir)
writer_2 = SummaryWriter(tensorboard_logdir_val)


train_tensorboard_stats_handler = TensorBoardStatsHandler(summary_writer=writer_1,
                                output_transform=lambda x: x,
                                global_epoch_transform=lambda x: trainer.state.epoch,tag_name="metric")
train_tensorboard_stats_handler.attach(evaluator_tb_train)

val_tensorboard_stats_handler = TensorBoardStatsHandler(summary_writer=writer_2,
                                output_transform=lambda x: x,
                                global_epoch_tr…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@o-fares
Comment options

@Nic-Ma
Comment options

@o-fares
Comment options

@Nic-Ma
Comment options

Comment options

You must be logged in to vote
1 reply
@Nic-Ma
Comment options

Answer selected by o-fares
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants