From a50607335f1ead311f55811672f891d265e46ec0 Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Fri, 20 Oct 2023 12:38:40 +0000 Subject: [PATCH] PT effective learning rate, small fix again --- returnn/torch/updater.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/returnn/torch/updater.py b/returnn/torch/updater.py index d3d0cf71d4..ad68fedeb8 100644 --- a/returnn/torch/updater.py +++ b/returnn/torch/updater.py @@ -106,10 +106,11 @@ def __init__(self, *, config, network, device, initial_learning_rate=1.0): ), "please specify **kwargs in dynamic_learning_rate for future compatibility" else: raise NotImplementedError("not implemented for not callable dynamic_learning_rate") - self._update_effective_learning_rate() self.optimizer = None # type: typing.Optional[torch.optim.Optimizer] + self._update_effective_learning_rate() + def set_learning_rate(self, value): """ Updates the learning rate of the optimizer at each (sub)epoch.