What "monitor value" in ReduceLROnPlateau?

According to torch.optim.lr_scheduler.ReduceLROnPlateau ,

mode (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’.

However, what is the quantity monitored? How to set this value?

In Keras, this function specifies very clearly:

keras.callbacks.ReduceLROnPlateau(monitor='val_loss', factor=0.1, patience=10)

You pass the value to monitor directly to the scheduler.step(value_to_monitor) function.
The example in the docs shows this usage.

1 Like