Excuse me, sir.
I read your file 'attention.py' and I find something wrong. In line 62, there is 'return x + (x * Mf)'.
According to the Eq.(2). in paper BAM: Bottleneck Attention Module, it should be 'return x * Mf' .
Because in the .py file, you have defined 'Mf = 1 + self.sigmoid(Mc * Ms)'.