hszhao / SAN

Exploring Self-attention for Image Recognition, CVPR2020.
MIT License
747 stars 132 forks source link

AggregationRefpadBackward failed #3

Closed liangkangzheng closed 4 years ago

liangkangzheng commented 4 years ago

Hi Zhao, when I test image of which height != width, errors occurred. lib/sa/functions/aggregation_refpad.py n, c_x, c_w, in_height, in_width = 2, 8, 4, 24, 44

RuntimeError: Function AggregationRefpadBackward returned an invalid gradient at index 0 - got [2, 8, 28, 44] but expected shape compatible with [2, 8, 24, 44]

Looking forward to your response! LIANG

hszhao commented 4 years ago

Thanks! It is due to four typos in the backward path. The issue has been addressed in the repo.