External-Attention-pytorch
External-Attention-pytorch copied to clipboard
padding value should be same with dilation value
Hi
When I check this line, I thought that to make sure the spatial size won't change, the padding value should be consistent with the dilation value. Since kernel_size = 3
, stride set as 1(default), 2 * p = d(3-1) = 2*d
, so p=d
(not constant 1)
https://github.com/xmu-xiaoma666/External-Attention-pytorch/blob/33ed21bc5f14720840f0f23de8ae13d1a00990c7/model/attention/BAM.py#L42
Best