self._next_summary_step = self._get_next_interval_step(self.summary_freq)
if step_after_process >= self._next_summary_step and self.get_step != 0:
self._write_summary(self._next_summary_step)
from guppy import hpy; h = hpy(); print(h.heap())
def _maybe_save_model(self, step_after_process: int) -> None:
"""