MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / LinearLR

Class LinearLR

monai/optimizers/lr_scheduler.py:41–48  ·  view source on GitHub ↗

Linearly increases the learning rate between two boundaries over a number of iterations.

Source from the content-addressed store, hash-verified

39
40
41class LinearLR(_LRSchedulerMONAI):
42 """Linearly increases the learning rate between two boundaries over a number of
43 iterations.
44 """
45
46 def get_lr(self):
47 r = self.last_epoch / (self.num_iter - 1)
48 return [base_lr + r * (self.end_lr - base_lr) for base_lr in self.base_lrs]
49
50
51class ExponentialLR(_LRSchedulerMONAI):

Callers 1

range_testMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…