Computing expensive metrics less frequently than using validation_step() #7356
-
Hi It is too expensive to compute them every validation epoch. Instead I would like to compute the metric once after every training epoch (or after some arbitrary number of steps). To do so, I need to be able to access the training dataset at the end of every training epoch, compute the metric and log it. It is not obvious how to do this, as I cannot access the training data-set during “on_epoch_end” or one of the other end of epoch hooks. Is there a good solution for this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Solved by using |
Beta Was this translation helpful? Give feedback.
Solved by using
self.trainer.datamodule