Tensorboard logging by epoch instead of by step
See original GitHub issueShort question concerning the tensorboard logging:
I am using it like this:
def training_epoch_end(self, outputs):
avg_loss = torch.stack([x['loss'] for x in outputs]).mean()
tensorboard_logs = {'train/loss': avg_loss}
for name in self.metrics:
tensorboard_logs['train/{}'.format(name)] = torch.stack([x['metr'][name] for x in outputs]).mean()
return {'loss': avg_loss, 'log': tensorboard_logs}
It works very well, but in the plots (the x-axis) is the step, so each batch is a step. Is it possible to have the x-axis be the epoch as I want to plot the metrics only per epoch?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:17 (7 by maintainers)
Top Results From Across the Web
Tensorboard logging by epoch instead of by step · Issue #2110
Short question concerning the tensorboard logging: I am using it like this: def training_epoch_end(self, outputs): avg_loss ...
Read more >TensorBoard Scalars: Logging training metrics in Keras
Logging metrics at the batch level instantaneously can show us the level of fluctuation between batches while training in each epoch, which can ......
Read more >Logging — PyTorch Lightning 1.8.5.post0 documentation
logger : Logs to the logger like Tensorboard , or any other custom logger passed to the Trainer (Default: True ). reduce_fx :...
Read more >tensorflow - "Epochs" instead of "Steps" in the horizontal axis ...
I am using keras_model_to_estimator to train an estimator and use tensorboard for analysis. The estimator logs the steps and not epochs, ...
Read more >Is there a way to only log on epoch end using the new Result ...
Is there a way to only log on epoch end using the new Result APIs? I was able to do this by forcing...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi,
It is possible to track both the steps and epochs using tensorboard. Here is an example. It is quite straightforwd.
Here is what it looks like.
Cheers!
Thank you, that was a good hint. I debugged it now.
It’s possible to pass in the ‘step’ which will be used as the current_epoch like this: