Schedule Visualization
About
It is often difficult to mentally visualize complex multiphase learning rate schedules.
To address this, d9d allows you to visualize the resulting learning rate curve interactively using plotly.
Usage Example
The visualize_lr_scheduler function takes a factory function that constructs your scheduler, simulates a training run, and plots the learning rate history.
API Reference
d9d.lr_scheduler.visualizer
visualize_lr_scheduler(factory, num_steps, init_lr=1.0)
Visualizes the learning rate schedule using Plotly.
This function simulates the training process for num_steps to record the LR changes
and generates an interactive plot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
factory
|
SchedulerFactory
|
A callable that accepts an Optimizer and returns an LRScheduler. |
required |
num_steps
|
int
|
The number of steps to simulate. |
required |
init_lr
|
float
|
The initial learning rate to set on the dummy optimizer. |
1.0
|
Raises:
| Type | Description |
|---|---|
ImportError
|
If the |