BAM-CBAM-pytorch icon indicating copy to clipboard operation
BAM-CBAM-pytorch copied to clipboard

Something wrong with code in attention.py

Open harudaee opened this issue 6 years ago • 4 comments

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)'.

harudaee avatar Nov 12 '19 14:11 harudaee

Thanks,

I use 'return x * Mf', but the code has not been modified at this time.

I will update the new code as soon as possible.

Thank U, sir.

-----Original Message----- From: "harudaee"[email protected] To: "asdf2kr/BAM-CBAM-pytorch"[email protected]; Cc: "Subscribed"[email protected]; Sent: 2019-11-12 (화) 23:18:06 (GMT+09:00) Subject: [asdf2kr/BAM-CBAM-pytorch] Something wrong with code in attention.py (#1)

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)'. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

asdf2kr avatar Nov 12 '19 16:11 asdf2kr

Hello sir, I want to add this CBAM block in the YOLOv4 object detection model. Can you please give some idea how I can proceed with it, it will help me a lot. Thank you in advance !!

Rvv1296 avatar Jun 22 '22 09:06 Rvv1296

@Rvv1296 Please check the darknet repository for this issue

asdf2kr avatar Jun 23 '22 02:06 asdf2kr

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)'.

Why Mf = 1 + self.sigmoid(Mc * Ms) instead of Mf = 1 + self.sigmoid(Mc + Ms), and where can I find an introduction to it

Tang-08080103 avatar Nov 02 '23 06:11 Tang-08080103