Skip to content

Commit

Permalink
move image to nn/image.py
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Mar 12, 2023
1 parent fe0e8a3 commit ed9ab6f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion sz.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash
# switched to cloc due to https://github.com/boyter/scc/issues/379
cloc --by-file tinygrad/*
cloc --by-file tinygrad/* | grep "tinygrad"
# also some sloccount for a dir summary
sloccount tinygrad | grep "python"
1 change: 0 additions & 1 deletion tinygrad/image.py → tinygrad/nn/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def image_dot(self, w):

def image_conv2d_decorator(normal_conv):
if IMAGE == 0: return normal_conv

def image_conv2d(self, weight, bias=None, groups=1, stride=1, dilation=1, padding=0):
(bs,_,iy,ix), (cout,cin,H,W) = self.shape, weight.shape
rcout = cout//groups
Expand Down
2 changes: 1 addition & 1 deletion tinygrad/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import List, Tuple, Callable, Optional, ClassVar, Type, Union, Sequence
from tinygrad.helpers import prod, argfix, make_pair, getenv, DEBUG, flatten, DType, dtypes, LazyNumpyArray
from tinygrad.lazy import Device, LazyBuffer
from tinygrad.image import image_conv2d_decorator, image_dot_decorator
from tinygrad.nn.image import image_conv2d_decorator, image_dot_decorator

# An instantiation of the Function is the Context
class Function:
Expand Down

0 comments on commit ed9ab6f

Please sign in to comment.