1
0
Fork 0

move image to nn/image.py

pull/702/head
George Hotz 2023-03-12 16:21:42 -07:00
parent fe0e8a306f
commit ed9ab6ff03
3 changed files with 4 additions and 3 deletions

4
sz.sh
View File

@ -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"

View File

@ -24,7 +24,6 @@ def image_dot_decorator(normal_dot):
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

View File

@ -5,7 +5,7 @@ import numpy as np
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: