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

Method lambda_func

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

Source from the content-addressed store, hash-verified

101 return lr_scheduler.LambdaLR(optimizer, self.lambda_func, self.last_epoch)
102
103 def lambda_func(self, current_step):
104 if current_step < self.warmup_epoch:
105 return float(current_step) / float(max(1, self.warmup_epoch))
106 return max(0.0, float(self.epochs - current_step) / float(max(1, self.epochs - self.warmup_epoch)))
107
108
109class CosineAnnealingLR(object):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected