fix docs mistakes in lr_scheduler.MultiplicativeLR (#33805)

Summary:
This PR is referenced to an issue: [The docs of `MultiplicativeLR` use `LambdaLR` as example](https://github.com/pytorch/pytorch/issues/33752#issue-570374087)

https://github.com/pytorch/pytorch/issues/33752
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33805

Differential Revision: D20121314

Pulled By: mruberry

fbshipit-source-id: 5afa63bbe83d35ce4e55705b8cbd96326a907651
This commit is contained in:
HearyShen
2020-02-27 14:09:02 -08:00
committed by Facebook Github Bot
parent d97560999b
commit edd5c009f7

View File

@ -247,9 +247,8 @@ class MultiplicativeLR(_LRScheduler):
last_epoch (int): The index of last epoch. Default: -1.
Example:
>>> # Assuming optimizer has two groups.
>>> lmbda = lambda epoch: 0.95
>>> scheduler = LambdaLR(optimizer, lr_lambda=lmbda)
>>> scheduler = MultiplicativeLR(optimizer, lr_lambda=lmbda)
>>> for epoch in range(100):
>>> train(...)
>>> validate(...)