Method
__init__
(self, lr: float, beta1: float, beta2: float, eps: float, weight_decay: float, use_adamw: bool)
Source from the content-addressed store, hash-verified
| 28 | |
| 29 | class 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): |
Tested by
no test coverage detected