diff --git a/docs/api/api_python/mindspore/mindspore.ReduceLROnPlateau.rst b/docs/api/api_python/mindspore/mindspore.ReduceLROnPlateau.rst index 7f89aaa469b..506943b7bca 100644 --- a/docs/api/api_python/mindspore/mindspore.ReduceLROnPlateau.rst +++ b/docs/api/api_python/mindspore/mindspore.ReduceLROnPlateau.rst @@ -14,7 +14,7 @@ mindspore.ReduceLROnPlateau - **monitor** (str) - 监控指标。如果是边训练边推理场景,合法的monitor配置值可以为"loss", "eval_loss"以及实例化 `Model` 时传入的metric名称;如果在训练时不做推理,合法的monitor配置值为"loss"。当monitor为"loss"时,如果训练网络有多个输出,默认取第一个值为训练损失值。默认值:"eval_loss"。 - **factor** (float) - 学习率变化系数,范围在0-1之间。默认值:0.1。 - - **patience** (int) - `moniter` 相对历史最优值变好超过 `min_delta` 视为当前epoch的模型效果有所改善,`patience` 为等待的无改善epoch的数量。默认值:10。 + - **patience** (int) - `moniter` 相对历史最优值变好超过 `min_delta` 视为当前epoch的模型效果有所改善,`patience` 为等待的无改善epoch的数量,当内部等待的epoch数 `self.wait` 大于等于 `patience` 时,训练停止。默认值:10。 - **verbose** (bool) - 是否打印相关信息。默认值:False。 - **mode** (str) - `{'auto', 'min', 'max'}` 中的一种,'min'模式下将在指标不再减小时改变学习率,'max'模式下将在指标不再增大时改变学习率,'auto'模式将根据当前 `monitor` 指标的特点自动设置。默认值:"auto"。 - **min_delta** (float) - `monitor` 指标变化的最小阈值,超过此阈值才视为 `monitor` 的变化。默认值:1e-4。 diff --git a/mindspore/python/mindspore/train/callback/_reduce_lr_on_plateau.py b/mindspore/python/mindspore/train/callback/_reduce_lr_on_plateau.py index 20c4181fbd8..e31a01685c3 100644 --- a/mindspore/python/mindspore/train/callback/_reduce_lr_on_plateau.py +++ b/mindspore/python/mindspore/train/callback/_reduce_lr_on_plateau.py @@ -57,7 +57,8 @@ class ReduceLROnPlateau(Callback): `new_lr = lr * factor`. Default: 0.1. patience (int): `monitor` value is better than history best value over `min_delta` is seen as improvement, `patience` is number of epochs - with no improvement after which learning rate + with no improvement that would be waited. When the waiting + counter `self.wait` is larger than or equal to `patience`, the lr will be reduced. Default: 10. verbose (bool): If False: quiet, if True: print related information. Default: False.