cfzd / FcaNet

FcaNet: Frequency Channel Attention Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What's the difference between FcaBottleneck and FcaBasicBlock ?

meiguoofa opened this issue · comments

As in your code, the FcaBottleneck expansion is 4 and FcaBasicBlock is 1, FcaBottleneck has one more layer of convolution than FcaBasicBlock, so how should I choose which module to use ?

and if i want to input a feature dim = 32 or 16, How should I set the wh?

commented

@meiguoofa
The story is:
ResNet has two kinds of blocks, which are Bottleneck and BasicBlock. Bottlenecks are used in large models like Res50, 101, 152. BasicBlocks are used in Res34 and Res18.

When they are combined with our attention method, it becomes FcaBottleneck and FcaBasicBlock. If you want to use our work, just use the defined fcanet34, fcanet50 functions to get the model.

If you have a feature dim like 32 or 16, just add an item in here:

c2wh = dict([(64,56), (128,28), (256,14) ,(512,7)])

like:

 c2wh = dict([(64,56), (128,28), (256,14) ,(512,7),  (32,112), (16, 224) ])

In this case, I set the size to 112 and 224 for 32 and 16 dim respectively. You can set it as you want.

Thank You! your answer helped me a lot.