cfzd / FcaNet

FcaNet: Frequency Channel Attention Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

最优频率分量问题

Lewis0427 opened this issue · comments

请问top里面的最优频率分量 是不是只适用于77,一旦改变尺寸为4848 最优频率分量是否需要更换,还是仍起作用?请指点一下

commented

@Lewis0427
我们目前的实验结果表明不需要更换,我们在COCO数据集(图像大小会变化)的网络也是一样使用7x7下的频率分量。可以参考一下这部分代码:

FcaNet/model/layer.py

Lines 53 to 59 in aa5fb63

x_pooled = x
if h != self.dct_h or w != self.dct_w:
x_pooled = torch.nn.functional.adaptive_avg_pool2d(x, (self.dct_h, self.dct_w))
# If you have concerns about one-line-change, don't worry. :)
# In the ImageNet models, this line will never be triggered.
# This is for compatibility in instance segmentation and object detection.
y = self.dct_layer(x_pooled)

好的知道了 谢谢您

MultiSpectralDCTLayer类当中选择learnable random init,learnable DCT init和fixed DCT init,fixed random init会影响不同任务的效果吗 ?应该怎么选择呢?

commented

@Lewis0427
如果你不是做实验探究这几个的区别的话,应该始终选择fixed DCT init.