layer init for all sizes
MODIFY
tinygrad/utils.py
tinygrad/utils.py
import numpy as np
-def layer_init_uniform(m, h):
- ret = np.random.uniform(-1., 1., size=(m,h))/np.sqrt(m*h)
+def layer_init_uniform(*x):
+ ret = np.random.uniform(-1., 1., size=x)/np.sqrt(np.prod(x))
return ret.astype(np.float32)
def fetch_mnist():

layer init for all sizes