Table 2 Pseudocode of the proposed algorithm in this paper.

From: A general lightweight image super-resolution with sharpening enhancement and double attention network

Module 1: SEM

Module 2: DAU

Total Framework 3: ESDAN

Input: feature Fi-1

Output: feature Fi

Begin

Ui-1←CO(SM(CO(Fi-1)))

Li-1←CO(CO(Fi-1))

Fi, ADFS←CON(Ui-1, Li-1)u

W1←SIG(CO(RE(CO(GA(Fi, ADFS)))))

W2←SIG(CO(RE(CO(GM(Fi, ADFS)))))

W3←SIG(CO(Fi, ADFS))

Fi, MWFE←CON(W1, W2, W3)

FiFi-1 + CO(Fi, MWFE)

End

Input: shallow feature F0;

deep feature FI

Output: residual image ISR,

Begin

FF0+ FI

Flocal←CO(RE(CO(F)))

Fgloal←GA(CO(RE(CO(F))))

W←SIG (Flocal+ Fgloal)

FupF0×W + FI×(1-W)

ISR, ←SPC(Fup)

End

Input: low image ILR

Output: super image ISR

Begin

F0←CO(ILR)

for i←1 in I do

Fi←SEM(Fi-1)

ISR, ←DAU(FI)

ISRISR, +BI(ILR)

End