MCG-NKU / SCNet

The official PyTorch implementation of CVPR 2020 paper "Improving Convolutional Networks with Self-Calibrated Convolutions"
MIT License
379 stars 70 forks source link

How to deal with when output channel number C‘ are not equal to input channel number C? #13

Open wenhangyu opened 3 years ago

wenhangyu commented 3 years ago

when output channel number C‘ are not equal to input channel number C,there is different channel numbers between identity with self.k2(x). So how to deal with this problem? The code as follows:

out = torch.sigmoid(torch.add(identity, F.interpolate(self.k2(x), identity.size()[2:])))

backseason commented 3 years ago

You may 1) set the output and input channels of self.k2() to be identical, or 2) replace the identity operation with a simple conv1x1 layer.