You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using pytorch-lightning as a base for a side project. My configure_optimizers looks this way:
defconfigure_optimizers(self):
""" return whatever optimizers we want here :return: list of optimizers """optimizer=optim.Adam(self.parameters(), lr=self.params.learning_rate)
scheduler=optim.lr_scheduler.ReduceLROnPlateau(optimizer,
mode='min',
factor=0.1,
patience=10,
min_lr=1e-6,
verbose=True)
return [optimizer], [scheduler]
But that doesn't work out of the box, because the ReduceLROnPlateau scheduler needs scheduler.step(val_loss) call instead of scheduler.step(num_epochs).
The scheduler improves greatly nn convergence, it would nice to support it.
Thank you
The text was updated successfully, but these errors were encountered:
It should be scheduler.step(val_loss, epochs=nb_epochs), not scheduler.step(nb_epochs). Right now scheduler is changing learning rate based on epoch number, not validation loss.
Hi,
I'm using pytorch-lightning as a base for a side project. My
configure_optimizers
looks this way:But that doesn't work out of the box, because the ReduceLROnPlateau scheduler needs
scheduler.step(val_loss)
call instead ofscheduler.step(num_epochs)
.The scheduler improves greatly nn convergence, it would nice to support it.
Thank you
The text was updated successfully, but these errors were encountered: