Plot multiple graphs in one plot using Tensorboard

If you are using the SummaryWriter from tensorboardX or pytorch 1.2, you have a method called add_scalars:

Call it like this:

my_summary_writer.add_scalars(f'loss/check_info', {
    'score': score[iteration],
    'score_nf': score_nf[iteration],
}, iteration)

And it will show up like this:

tensorboard image


Be careful that add_scalars will mess with the organisation of your runs: it will add mutliple entries to this list (and thus create confusion):

tensorboard image

I would recommend that instead you just do:

my_summary_writer.add_scalar(f'check_info/score',    score[iter],    iter)
my_summary_writer.add_scalar(f'check_info/score_nf', score_nf[iter], iter)

Leave a Comment

techhipbettruvabetnorabahisbahis forumu