Class DistillationCheckpointConfig
- Namespace
- AiDotNet.KnowledgeDistillation
- Assembly
- AiDotNet.dll
Configuration for distillation checkpoint management.
public class DistillationCheckpointConfig
- Inheritance
-
DistillationCheckpointConfig
- Inherited Members
Remarks
For Beginners: This class controls when and how models are saved during knowledge distillation training. Think of it like the "auto-save" settings in a video game.
Properties
BestMetric
Metric to use for determining "best" checkpoint (e.g., "validation_loss", "accuracy").
public string BestMetric { get; set; }
Property Value
CheckpointDirectory
Directory where checkpoints will be saved.
public string CheckpointDirectory { get; set; }
Property Value
CheckpointPrefix
Prefix for checkpoint filenames.
public string CheckpointPrefix { get; set; }
Property Value
KeepBestN
Keep only the best N checkpoints based on validation metric.
public int KeepBestN { get; set; }
Property Value
Remarks
Set to 0 to keep all checkpoints. Example: KeepBestN = 3 keeps only the 3 checkpoints with best validation performance.
LowerIsBetter
Whether lower metric values are better (true for loss, false for accuracy).
public bool LowerIsBetter { get; set; }
Property Value
SaveCurriculumState
Save curriculum strategy state with checkpoint.
public bool SaveCurriculumState { get; set; }
Property Value
Remarks
Allows resuming with correct curriculum progress.
SaveEveryBatches
Save checkpoint every N batches (0 = disabled).
public int SaveEveryBatches { get; set; }
Property Value
Remarks
Useful for very long epochs. Example: SaveEveryBatches = 1000 means save after 1000 batches, 2000 batches, etc.
SaveEveryEpochs
Save checkpoint every N epochs (0 = disabled).
public int SaveEveryEpochs { get; set; }
Property Value
Remarks
Example: SaveEveryEpochs = 5 means save after epochs 5, 10, 15, etc.
SaveMetadata
Save training metadata (epoch number, loss history, etc.).
public bool SaveMetadata { get; set; }
Property Value
SaveStudent
Save the student model checkpoint.
public bool SaveStudent { get; set; }
Property Value
SaveTeacher
Save the teacher model checkpoint.
public bool SaveTeacher { get; set; }
Property Value
Remarks
Useful for multi-stage distillation where student becomes teacher.