google-research / maxim

[CVPR 2022 Oral] Official repository for "MAXIM: Multi-Axis MLP for Image Processing". SOTA for denoising, deblurring, deraining, dehazing, and enhancement.
https://arxiv.org/abs/2201.02973
Apache License 2.0
977 stars 105 forks source link

Wrong about the computational complexity #15

Closed Med-Process closed 1 year ago

Med-Process commented 2 years ago

image

Here, for dense layers, the computational complexity should be: d^2HW(C/2) + b^2HW(C/2) + 3HWC^2

vztu commented 2 years ago

Given the input feature H,W,C, the whole Multi-axis gMLP block (figure 3) has: Input proj (2HWC^2) + Output proj (2HWC^2) + Block-gMLP dense (3HWC^2) + Grid-gMLP dense (3HWC^2) = 10HWC^2

Note: the first Dense layer in gMLP block expands channels from C to 2C, thus 2HWC^2. Output Dense in gMLP is HWC^2. So the whole gMLP block has 3HWC^2.

Med-Process commented 2 years ago

I see. Thank you. But, the figure 3 is confused with C and C / 2.

vztu commented 2 years ago

Oh yeah you're right. We follow common complexity convention from Swin, etc, but didn't expect to cause a confusion.