External-Attention-pytorch icon indicating copy to clipboard operation
External-Attention-pytorch copied to clipboard

padding value should be same with dilation value

Open CiaoHe opened this issue 2 years ago • 0 comments

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)

image

https://github.com/xmu-xiaoma666/External-Attention-pytorch/blob/33ed21bc5f14720840f0f23de8ae13d1a00990c7/model/attention/BAM.py#L42

Best

CiaoHe avatar Oct 15 '21 05:10 CiaoHe