reduce_lr_on_plateau
ReduceLROnPlateau
¶
Bases: Trace
Reduce learning rate based on evaluation results.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model |
Union[Model, Module]
|
A model instance compiled with fe.build. |
required |
metric |
Optional[str]
|
The metric name to be monitored. If None, the model's validation loss will be used as the metric. |
None
|
patience |
int
|
Number of epochs to wait before reducing LR again. |
10
|
factor |
float
|
Reduce factor for the learning rate. |
0.1
|
best_mode |
str
|
Higher is better ("max") or lower is better ("min"). |
'min'
|
min_lr |
float
|
Minimum learning rate. |
1e-06
|
Raises:
Type | Description |
---|---|
AssertionError
|
If the loss cannot be inferred from the |