MCPcopy Create free account
hub / github.com/buaacxf/VIPTR / lambda_func

Method lambda_func

optimizer.py:64–67  ·  view source on GitHub ↗
(self, current_step)

Source from the content-addressed store, hash-verified

62 return lr_scheduler.LambdaLR(optimizer, self.lambda_func, self.last_epoch)
63
64 def lambda_func(self, current_step):
65 if current_step < self.warmup_epoch:
66 return float(current_step) / float(max(1, self.warmup_epoch))
67 return self.gamma ** len([m for m in self.milestones if m <= current_step])
68
69class ConstLR(object):
70 def __init__(self,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected