CBAM.PyTorch icon indicating copy to clipboard operation
CBAM.PyTorch copied to clipboard

fc or conv in file resnet_cbam.py, line 31 and line 33?

Open huqiaoping opened this issue 5 years ago • 1 comments

For the file resnet_cbam.py, I think line31 and line 33 are not consistent with the paper. fc1 and fc2 should be nn.Linear because the paper said:

Both descriptors are then forwarded to a shared network to produce our channel attention map Mc 2 RC11. The shared network is composed of multi-layer perceptron (MLP) with one hidden layer. To reduce parameter overhead, the hidden activation size is set to RC=r11, where r is the reduction ratio.

May I know why you use conv instead of Linear ?

huqiaoping avatar Jun 23 '20 07:06 huqiaoping

For the file resnet_cbam.py, I think line31 and line 33 are not consistent with the paper. fc1 and fc2 should be nn.Linear because the paper said:

Both descriptors are then forwarded to a shared network to produce our channel attention map Mc 2 RC�1�1. The shared network is composed of multi-layer perceptron (MLP) with one hidden layer. To reduce parameter overhead, the hidden activation size is set to RC=r�1�1, where r is the reduction ratio.

May I know why you use conv instead of Linear ?

1x1 Convs are often used instead of Linears to reduce the number of parameters.

THUGAF avatar Jan 21 '21 04:01 THUGAF