Schedule Visualization
About
visualize_lr_scheduler plots a learning rate schedule as an interactive Plotly chart. It helps you check a multiphase schedule before you train with it. It needs the d9d[visualization] extra.
Usage
Pass a function that builds your scheduler for a given optimizer. visualize_lr_scheduler builds the scheduler for a dummy optimizer, steps it num_steps times and plots the learning rate at each step.
API Reference
d9d.lr_scheduler.visualizer
Plotting of learning rate schedules.
visualize_lr_scheduler(factory, num_steps, init_lr=1.0)
Plots a learning rate schedule as an interactive Plotly chart.
The function builds the scheduler for a dummy optimizer, steps it num_steps times and plots the
learning rate at each step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
factory
|
SchedulerFactory
|
Callable that builds the scheduler for a given optimizer. |
required |
num_steps
|
int
|
Number of steps to simulate. |
required |
init_lr
|
float
|
Initial learning rate of the dummy optimizer. |
1.0
|
Raises:
| Type | Description |
|---|---|
ImportError
|
If |