Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReduceLROnPlateau #4

Open
nbgundavarapu opened this issue Oct 11, 2022 · 1 comment
Open

ReduceLROnPlateau #4

nbgundavarapu opened this issue Oct 11, 2022 · 1 comment

Comments

@nbgundavarapu
Copy link

nbgundavarapu commented Oct 11, 2022

ReduceLROnPlateau by default assumes a "min" metric (https://pytorch.org/docs/stable/generated/torch.optim.lr_scheduler.ReduceLROnPlateau.html)

mode ([str](https://docs.python.org/3/library/stdtypes.html#str)) – One of min, max. In min mode, lr will be reduced when the quantity monitored has stopped decreasing; in max mode it will be reduced when the quantity monitored has stopped increasing. Default: ‘min’.

In LVU tasks it used for accuracy metric, but the mode is not changed. Is this expected?

scheduler = torch.optim.lr_scheduler.ReduceLROnPlateau(optimizer, patience=patience, factor=0.2)

scheduler.step(val_acc)

@md-mohaiminul
Copy link
Owner

Hi,
That's a very good observation. I guess it was not intended. You can try changing the mode of ReduceLROnPlateau to 'max'.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants