What's the difference between channel-wise convolution and depth-wise convolution?
Wilbur529 opened this issue · comments
Wilbur529 commented
Hi,i am confused with the channel-wise convolution operator. Could you give some suggestions about how to distinguish this?
In your source code, i think it is more similar to depth-conv which is used in MobileNets.
class ChannelWiseConv(nn.Module):
def __init__(self, nIn, nOut, kSize, stride=1):
"""
Args:
nIn: number of input channels
nOut: number of output channels, default (nIn == nOut)
kSize: kernel size
stride: optional stride rate for down-sampling
"""
super().__init__()
padding = int((kSize - 1)/2)
self.conv = nn.Conv2d(nIn, nOut, (kSize, kSize), stride=stride, padding=(padding, padding), groups=nIn, bias=False)
And i found this paper, "ChannelNets: Compact and Efficient ConvolutionalNeural Networks via Channel-Wise Convolutions", which give a definition of "Channel-wise convolution"。https://arxiv.org/abs/1809.01330
What kind of openator is used in CGNet indeed?