Skip to content

Commit 15d8304

Browse files
committed
mnist_cnn: Remove unused inline downscaling code
Took 58 ms instead of 64 ms, not really worth it
1 parent 5aa0aba commit 15d8304

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

examples/mnist_cnn/downscale.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,6 @@ def downscale(inp, out, in_size : int, out_size : int):
2424
for row in range(out_size):
2525
for col in range(out_size):
2626
o : int = (row * out_size) + col
27-
28-
#acc : int = 0
29-
#size : int = factor
30-
#x : int = col*factor
31-
#y : int = row*factor
32-
#rowstride = in_size
33-
#for r in range(y, y+size):
34-
# for c in range(x, x+size):
35-
# acc += inp[(r*rowstride)+c]
36-
#avg = acc // (size*size)
37-
#out[o] = avg
38-
3927
out[o] = average2d(inp, in_size, col*factor, row*factor, factor)
4028

4129

0 commit comments

Comments
 (0)