raoyongming / GFNet

[NeurIPS 2021] [T-PAMI] Global Filter Networks for Image Classification
https://gfnet.ivg-research.xyz/
MIT License
445 stars 41 forks source link

Code issue #7

Closed qdd1234 closed 3 years ago

qdd1234 commented 3 years ago

您好,图中的红框中,您给权重乘上0.002这是什么作用? image 还有一个小问题,为何你不直接对维数为N这个轴做一维傅里叶变换,然后再乘上可学习的权重?

raoyongming commented 3 years ago

Hi, thanks for your interest in our paper.

The complex weight is initialized using the normal distribution with std=0.02 following the initialization method of other parameters like linear weights (see this line).

We use 2d fft instead of 1d fft since it can better preserve the spatial structure of the input image. For example, in 1d fft, the last element in the first row and the first element in the second row are neighbors in the flattened 1d signal.