MCPcopy
hub / github.com/hpcaitech/ColossalAI / __init__

Method __init__

tests/test_optimizer/test_adam_kernel.py:30–36  ·  view source on GitHub ↗
(self, lr: float, beta1: float, beta2: float, eps: float, weight_decay: float, use_adamw: bool)

Source from the content-addressed store, hash-verified

28
29class AdamKernel:
30 def __init__(self, lr: float, beta1: float, beta2: float, eps: float, weight_decay: float, use_adamw: bool) -> None:
31 self.lr = lr
32 self.beta1 = beta1
33 self.beta2 = beta2
34 self.eps = eps
35 self.weight_decay = weight_decay
36 self.use_adamw = use_adamw
37
38 @abstractmethod
39 def update(self, step: int, param: Tensor, grad: Tensor, exp_avg: Tensor, exp_avg_sq: Tensor):

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected