I am trying to plot the progression of my model’s weights during training using
add_scalar, however, the tensorboard plot only shows the weights for any one epoch.
What I mean by this is, when I load tensorboard, I only see “epoch 0” in the scalars section even if I have run my model for 10 epochs. However, I dont have this issue while plotting histograms in the same code.
My code is as follows:
for epoch in total_epochs: train model calculate error optimizer.step() calculate average loss for name,weight in model.named_parameters(): SummaryWriter.add_histogram(name, weight, epoch) SummaryWriter.add_scalar(str(name), weight, epoch)
Here is an example of what I mean - imgur.com/a/l2ZL5da I trained the model for 10 epochs but tensorboard is only plotting the weights for epoch 0 and 1, whereas the histogram (not pictured) captures the progression for all 10 epochs.
Not sure why this is happening