mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-25 14:58:46 -05:00
Improve type hints for optimizer (#3583)
* Improve type hints for optimizer * lint fix
This commit is contained in:
@@ -22,6 +22,8 @@ class Optimizer:
|
||||
# NOTE: in extra is too late for most of the params due to issues with assign
|
||||
Tensor.corealize(extra + self.params + self.buffers if extra is not None else self.params + self.buffers)
|
||||
|
||||
def step(self) -> None: raise NotImplementedError
|
||||
|
||||
class SGD(Optimizer):
|
||||
def __init__(self, params: List[Tensor], lr=0.001, momentum=0, weight_decay=0.0, nesterov=False):
|
||||
super().__init__(params, lr)
|
||||
|
||||
Reference in New Issue
Block a user