mirror of https://github.com/commaai/tinygrad.git
oops, set to None
This commit is contained in:
parent
935f5ddaaa
commit
c74764bac3
|
@ -67,8 +67,3 @@ loss.backward()
|
|||
optim.step()
|
||||
```
|
||||
|
||||
### TODO (to make real neural network library)
|
||||
|
||||
* Implement gradcheck (numeric)
|
||||
* Make convolutions not slow while removing lines of code (NO CYTHON!)
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ try:
|
|||
builtins.__dict__['profile'] = prof
|
||||
# add @profile decorator to probe
|
||||
except ImportError:
|
||||
pass
|
||||
prof = None
|
||||
|
||||
import cProfile
|
||||
import unittest
|
||||
|
|
|
@ -34,11 +34,11 @@ def fetch_mnist():
|
|||
def im2col(x, H, W):
|
||||
bs,cin,oy,ox = x.shape[0], x.shape[1], x.shape[2]-(H-1), x.shape[3]-(W-1)
|
||||
|
||||
# TODO: use something like np.take for speed
|
||||
tx = np.empty((bs, oy, ox, cin*W*H), dtype=x.dtype)
|
||||
for Y in range(oy):
|
||||
for X in range(ox):
|
||||
tx[:, Y, X] = x[:, :, Y:Y+H, X:X+W].reshape(bs, -1)
|
||||
|
||||
return tx.reshape(-1, cin*W*H)
|
||||
|
||||
def col2im(tx, H, W, OY, OX):
|
||||
|
|
Loading…
Reference in New Issue