Skip to content

Commit a685bbd

Browse files
author
Robert Muchsel
authored
Ignore kernel sizes for passthrough layers (#146)
1 parent 44d97a5 commit a685bbd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

izer/backend/max7800x.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ def create_net(self) -> str: # pylint: disable=too-many-locals,too-many-branche
274274
eprint(f'`next_sequence` must be {ll+1} when using streaming in layer {ll}. '
275275
f'Currently configured: {next_sequence[ll]}')
276276

277-
if tc.dev.EMULATE_1X1_STREAMING and streaming[ll] and kernel_size[ll] == [1, 1]:
277+
if tc.dev.EMULATE_1X1_STREAMING and streaming[ll] and kernel_size[ll] == [1, 1] \
278+
and operator[ll] in [op.CONV2D, op.CONVTRANSPOSE2D]:
278279
wprint(f'Layer {ll}: Using 3x3 kernels to emulate 1x1 streaming layer')
279280
# Create 3x3 weights from 1x1 weights and emulate using 3x3 kernels
280281
weight33 = np.zeros((kernel[ll].shape[0], 3, 3), dtype=np.int64)

0 commit comments

Comments
 (0)