MCPcopy
hub / github.com/tinygrad/tinygrad / get_lr

Method get_lr

extra/lr_scheduler.py:27–30  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

25 self.gamma = gamma
26
27 def get_lr(self) -> Tensor:
28 if self.epoch_counter.numpy()[0] not in self.milestones:
29 return self.optimizer.lr
30 return self.optimizer.lr * self.gamma
31
32class ReduceLROnPlateau(LR_Scheduler):
33 def __init__(self, optimizer: Optimizer, mode="min", factor=0.1, patience=10, threshold=1e-4, threshold_mode="rel"):

Callers

nothing calls this directly

Calls 1

numpyMethod · 0.45

Tested by

no test coverage detected