MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / get_lr

Method get_lr

k_diffusion/utils.py:224–229  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

222 super().__init__(optimizer, last_epoch, verbose)
223
224 def get_lr(self):
225 if not self._get_lr_called_within_step:
226 warnings.warn("To get the last learning rate computed by the scheduler, "
227 "please use `get_last_lr()`.")
228
229 return self._get_closed_form_lr()
230
231 def _get_closed_form_lr(self):
232 warmup = 1 - self.warmup ** (self.last_epoch + 1)

Callers

nothing calls this directly

Calls 1

_get_closed_form_lrMethod · 0.95

Tested by

no test coverage detected