INNER CODE UNIT · TypeScript

on_batch_begin

theaniketgiri/create-llm · src/python-callback-templates.ts:47

    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"""
        pass
`;
  }

  /**
   * Get CheckpointCallback
   */
  static getCheckpointCallback(): string {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…