ConvNeXt + extras (#657)

* simple convnext implementation

* shorter function names

* need to realize the random functions now

* creating an optimizer realizes all params

* assign contiguous

* fix lazy lazy

* why was i doing that...add convnext to tests

* LazyNumpyArray

* enable assert + comment

* no two tiny
This commit is contained in:
George Hotz
2023-03-06 22:10:56 -08:00
committed by GitHub
parent d8dda2af3a
commit b14d31d6db
9 changed files with 111 additions and 25 deletions

View File

@@ -149,9 +149,9 @@ class TestTinygrad(unittest.TestCase):
for random_fn in [Tensor.randn, Tensor.uniform, Tensor.scaled_uniform, Tensor.glorot_uniform]:
with self.subTest(msg=f"Tensor.{random_fn.__name__}"):
Tensor.manual_seed(1337)
a = random_fn(10,10)
a = random_fn(10,10).realize()
Tensor.manual_seed(1337)
b = random_fn(10,10)
b = random_fn(10,10).realize()
np.testing.assert_allclose(a.numpy(), b.numpy())
if __name__ == '__main__':