wutianyiRosun / CGNet

CGNet: A Light-weight Context Guided Network for Semantic Segmentation [IEEE Transactions on Image Processing 2020]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's the difference between channel-wise convolution and depth-wise convolution?

Wilbur529 opened this issue · comments

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?