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

Method _get_closed_form_lr

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

Source from the content-addressed store, hash-verified

229 return self._get_closed_form_lr()
230
231 def _get_closed_form_lr(self):
232 warmup = 1 - self.warmup ** (self.last_epoch + 1)
233 lr_mult = (self.decay ** (1 / self.num_steps)) ** self.last_epoch
234 return [warmup * max(self.min_lr, base_lr * lr_mult)
235 for base_lr in self.base_lrs]
236
237
238class ConstantLRWithWarmup(optim.lr_scheduler._LRScheduler):

Callers 1

get_lrMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected