External-Attention-pytorch icon indicating copy to clipboard operation
External-Attention-pytorch copied to clipboard

Wrong BAM module in your code

Open Luo-Z13 opened this issue 2 years ago • 0 comments

I notice the code in BAM is : def forward(self, x): b, c, _, _ = x.size() sa_out=self.sa(x) ca_out=self.ca(x) weight = self.sigmoid(sa_out*ca_out) weight=self.sigmoid(sa_out+ca_out) # here out=(1+weight)*x return out here should be '*' instead of '+'.

Luo-Z13 avatar Nov 25 '22 09:11 Luo-Z13