VeriSilicon/TIM-VX

Grouped Conv2D optimization when groups equal to input channels

fengwang opened this issue · 1 comments

When the input channels and groups are identical, which is a common case of networks, the GroupedConv2d is basically Depthwise Conv2D of depth 1.

Given the fact that stacked Conv2D for GroupedConv2d is not efficient (

for (i = 0; i < nn_param->group; i++)
) when the number of groups is large (32, 64, 128 etc ), maybe it is a good idea optimize Grouped Conv2D into Depthwise Conv2D when the input channels are equal to the groups?

Hi FengWang,

In such case input_channel equal to group number. You should map it to depthwise conv directly.