Accumulate Metrics for K Batches
What is your question?
I would like to aggregate metrics for k minibatches before logging to Tensorboard. How can I accomplish this?
For example, I would like to average my loss and accuracy for 10 minibatches and report that value to TensorBoard, not just report the statistics on the 10th minibatch.
What have you tried?
I noticed there's a log_save_interval argument for the trainer, but, this only logs the metrics computed per one batch. This is not that useful for me because my batch size is very small, so I need to average my statistics across multiple minibatches.
There is a train_epoch_end method I can override, but only gives me my outputs at the end of an epoch. I am looking for something like this where I have access to all my outputs from the previous k minibatches so I can aggregate them.