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

Method _get_closed_form_lr

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

Source from the content-addressed store, hash-verified

188 return self._get_closed_form_lr()
189
190 def _get_closed_form_lr(self):
191 warmup = 1 - self.warmup ** (self.last_epoch + 1)
192 lr_mult = (1 + self.last_epoch / self.inv_gamma) ** -self.power
193 return [warmup * max(self.min_lr, base_lr * lr_mult)
194 for base_lr in self.base_lrs]
195
196
197class ExponentialLR(optim.lr_scheduler._LRScheduler):

Callers 1

get_lrMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected