Enum SchedulerStepMode
- Namespace
- AiDotNet.LearningRateSchedulers
- Assembly
- AiDotNet.dll
Specifies when the learning rate scheduler should be stepped during training.
public enum SchedulerStepMode
Fields
StepPerBatch = 0Step the scheduler after each mini-batch.
Use this for schedulers that need fine-grained control, such as warmup schedulers or cyclical learning rate policies.
StepPerEpoch = 1Step the scheduler after each epoch (default).
This is the most common mode. The learning rate changes once per complete pass through the training dataset.
WarmupThenEpoch = 2Step per-batch during warmup phase, then switch to per-epoch.
This is useful for transformer training where a warmup phase gradually increases the learning rate, followed by a decay schedule that operates per-epoch.
Remarks
Different training scenarios require different scheduling strategies. This enum allows you to configure how frequently the learning rate is updated.
For Beginners: This controls when the learning rate changes: - Per batch: Changes after every mini-batch (more frequent, smoother changes) - Per epoch: Changes after each complete pass through the dataset (most common) - Warmup then epoch: Increases LR during warmup (per batch), then switches to per-epoch