From 4994909dcaa0b1638c65dcd1829803b2dfde724a Mon Sep 17 00:00:00 2001 From: Laughing-q <1185102784@qq.com> Date: Thu, 27 Jun 2024 20:59:00 +0800 Subject: [PATCH] update num_heads --- ultralytics/nn/modules/block.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ultralytics/nn/modules/block.py b/ultralytics/nn/modules/block.py index 2fe885dd6..9f0f02df9 100644 --- a/ultralytics/nn/modules/block.py +++ b/ultralytics/nn/modules/block.py @@ -980,7 +980,7 @@ class PSA(nn.Module): self.cv1 = Conv(c1, 2 * self.c, 1, 1) self.cv2 = Conv(2 * self.c, c1, 1) - self.attn = Attention(self.c, attn_ratio=0.5, num_heads=self.c // 128) + self.attn = Attention(self.c, attn_ratio=0.5, num_heads=self.c // 32) self.ffn = nn.Sequential(Conv(self.c, self.c * 2, 1), Conv(self.c * 2, self.c, 1, act=False)) def forward(self, x):