mmagic.models.editors.nafnet.naf_avgpool2d
¶
Module Contents¶
Classes¶
Average Pooling 2D used in NAFNet. |
|
Local Base class to use global average pooling. |
Functions¶
|
Replace all layers with AvgPool2d. |
- class mmagic.models.editors.nafnet.naf_avgpool2d.NAFAvgPool2d(kernel_size=None, base_size=None, auto_pad=True, fast_imp=False, train_size=None)[source]¶
Bases:
mmengine.model.BaseModule
Average Pooling 2D used in NAFNet.
Note: this is different from the normal AvgPool2d in pytorch. According to: Improving Image Restoration by Revisiting Global Information Aggregation statistics are aggregated in a local region for each pixel rather than the global average pooling.