The LowerConvsToMatMul function does not seem to support the ordinary im2col transformation of grouped convolutions.
#72
Replies: 2 comments
-
|
Hi @sansi-zhang - you are correct, the If this is something you'd like to work on and contribute to |
Beta Was this translation helpful? Give feedback.
-
|
Hi @maltanar, thank you very much for your reply. I've tried to solve it at the software level, for i in range(OFM):
OFM_group = OFM // group
n = i // OFM_group
in_start = n * IFM_group
in_end = (n + 1) * IFM_group
W_sparse[i, in_start:in_end, :, :] = weights_to_modify[i, :, :, :]I used the above code to convert the weights of the grouped convolution into the weights of the ordinary convolution, and then I implemented its hardware structure through MVU. Moreover, this code can also be used as the construction code of the sparse matrix in the
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I got a "reshape" error while using
LowerConvsToMatMulto process grouped convolutions.I set the number of groups to be a factor of the number of input channels, and I've seen the corresponding value being written to the node in onnx, but there's an error when using
LowerConvsToMatMul, it seems that it doesn't correctly recognize grouped convolutions with fewer groups than the number of input channels.Can I fix this by adjusting
LowerConvsToMatMul?If can I hope you can give me some guidance and advice.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions