MCPcopy Create free account
hub / github.com/davda54/sam / __init__

Method __init__

example/utility/step_lr.py:2–5  ·  view source on GitHub ↗
(self, optimizer, learning_rate: float, total_epochs: int)

Source from the content-addressed store, hash-verified

1class StepLR:
2 def __init__(self, optimizer, learning_rate: float, total_epochs: int):
3 self.optimizer = optimizer
4 self.total_epochs = total_epochs
5 self.base = learning_rate
6
7 def __call__(self, epoch):
8 if epoch < self.total_epochs * 3/10:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected