From d56a0af6cbf7753a971b7c952d775767fcab0be8 Mon Sep 17 00:00:00 2001 From: George Hotz Date: Fri, 23 Oct 2020 06:17:40 -0700 Subject: [PATCH] t isn't used --- tinygrad/optim.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tinygrad/optim.py b/tinygrad/optim.py index d2465c40..96c13226 100644 --- a/tinygrad/optim.py +++ b/tinygrad/optim.py @@ -42,12 +42,10 @@ class RMSprop(Optimizer): self.lr = lr self.decay = decay self.eps = eps - self.t = 0 self.v = [np.zeros_like(t.data) for t in self.params] def step(self): - self.t += 1 for i, t in enumerate(self.params): self.v[i] = self.decay * self.v[i] + (1 - self.decay) * np.square(t.grad) - t.data -= (self.lr / np.sqrt(self.v[i] + self.eps)) * t.grad \ No newline at end of file + t.data -= (self.lr / np.sqrt(self.v[i] + self.eps)) * t.grad