Fix reshape usage in ARM Winograd (#5732)
authorCody Yu <comaniac0422@gmail.com>
Fri, 5 Jun 2020 17:27:57 +0000 (10:27 -0700)
committerGitHub <noreply@github.com>
Fri, 5 Jun 2020 17:27:57 +0000 (10:27 -0700)
topi/python/topi/arm_cpu/conv2d_alter_op.py

index 221ccce..3206168 100644 (file)
@@ -117,7 +117,7 @@ def _alter_conv2d_layout(attrs, inputs, tinfos, out_type):
         weight_expr = relay.reshape(weight_expr,
                                     newshape=(KH + tile_size - 1,
                                               KW + tile_size - 1,
-                                              idxd(CO, VC), VC, CI))
+                                              CO // VC, VC, CI))
         weight_expr = relay.transpose(weight_expr, axes=[0, 1, 2, 4, 3])
 
         new_attrs['tile_size'] = tile_size