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

Method get_lr

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

Source from the content-addressed store, hash-verified

181 super().__init__(optimizer, last_epoch, verbose)
182
183 def get_lr(self):
184 if not self._get_lr_called_within_step:
185 warnings.warn("To get the last learning rate computed by the scheduler, "
186 "please use `get_last_lr()`.")
187
188 return self._get_closed_form_lr()
189
190 def _get_closed_form_lr(self):
191 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