fix patience docs in reducelronplatue

Merge pull request  from liutongtong9/code_docs_fixdocma
This commit is contained in:
i-robot 2022-07-01 12:09:52 +00:00 committed by Gitee
commit fe44eb7daa
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 3 additions and 2 deletions
docs/api/api_python/mindspore
mindspore/python/mindspore/train/callback

View File

@ -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。

View File

@ -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.