From e6d55932ca9100b7adac3626f36de259c560b1be Mon Sep 17 00:00:00 2001 From: George Hotz Date: Mon, 18 Mar 2024 18:22:44 -0700 Subject: [PATCH] hotfix: this makes beautiful mnist work again, not okay --- tinygrad/nn/optim.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tinygrad/nn/optim.py b/tinygrad/nn/optim.py index aa1d3f40a9..f18b29c2e7 100644 --- a/tinygrad/nn/optim.py +++ b/tinygrad/nn/optim.py @@ -20,7 +20,10 @@ class Optimizer: def realize(self, extra=None): # 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) + #Tensor.corealize(extra + self.params + self.buffers if extra is not None else self.params + self.buffers) + # TODO: SUPER BROKEN THAT THIS FIXES IT + if extra is not None: Tensor.corealize(extra) + Tensor.corealize(self.params + self.buffers) def step(self) -> None: raise NotImplementedError