DeLightCMU / RSC

This is the official implementation of Self-Challenging Improves Cross-Domain Generalization, ECCV2020
BSD 2-Clause "Simplified" License
160 stars 18 forks source link

Question about the spatial-wise RSC #3

Closed YijinHuang closed 3 years ago

YijinHuang commented 4 years ago

I am confused about the spatial-wise RSC. If you apply average pooling to z (final feature map) and feed in the fully connected layer, I believe that for any channel of z, all values in that channel will be the same. Therefore, after an average pooling along channel dimension, all cells in the 7*7 weighting matrix will have the same value too. So, how do you select top p percentage? Did I miss something? Thank you.

Justinhzy commented 4 years ago

Hi, you are right. For alexnet, z is diretly used to guide muting. For resnet, downsampled middle layer spatial gradients are used to guide muting for z. Now I have seperated the code for alexnet and resnet respectively. Hope it helps.

YijinHuang commented 4 years ago

Hi, you are right. For alexnet, z is diretly used to guide muting. For resnet, downsampled middle layer spatial gradients are used to guide muting for z. Now I have seperated the code for alexnet and resnet respectively. Hope it helps.

Got it. Thank you.