We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da431dd commit 22fd7fcCopy full SHA for 22fd7fc
utils/activations.py
@@ -92,7 +92,7 @@ def __init__(self, c1, k=1, s=1, r=16): # ch_in, kernel, stride, r
92
def forward(self, x):
93
y = x.mean(dim=2, keepdims=True).mean(dim=3, keepdims=True)
94
# batch-size 1 bug/instabilities https://github.com/ultralytics/yolov5/issues/2891
95
- # beta = torch.sigmoid(self.bn2(self.fc2(self.bn1(self.fc1(y)))))
+ # beta = torch.sigmoid(self.bn2(self.fc2(self.bn1(self.fc1(y))))) # bug/unstable
96
beta = torch.sigmoid(self.fc2(self.fc1(y))) # bug patch BN layers removed
97
dpx = (self.p1 - self.p2) * x
98
return dpx * torch.sigmoid(beta * dpx) + self.p2 * x
0 commit comments