INNER CODE UNIT · TypeScript
on_epoch_begin
theaniketgiri/create-llm · src/python-callback-templates.ts:39
def on_epoch_begin(self, trainer: Any, epoch: int):
"""Called at the beginning of each epoch"""
pass
def on_epoch_end(self, trainer: Any, epoch: int):
"""Called at the end of each epoch"""
pass
def on_batch_begin(self, trainer: Any, batch: Dict[str, Any]):
"""Called before processing each batch"""
pass
def on_batch_end(self, trainer: Any, batch: Dict[str, Any], outputs: Dict[str, Any]):
"""Called after processing each batch"""
pass
def on_step_end(self, trainer: Any, step: int, loss: float, metrics: Optional[Dict[str, float]] = None):
"""Called after each training step"""