Skip to content

Commit a2bb42d

Browse files
authored
Fix Conv2() fusing (ultralytics#2885)
1 parent 882dbe6 commit a2bb42d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ultralytics/nn/modules/conv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def fuse_convs(self):
5959
"""Fuse parallel convolutions."""
6060
w = torch.zeros_like(self.conv.weight.data)
6161
i = [x // 2 for x in w.shape[2:]]
62-
w[:, :, i[0] - 1:i[0], i[1] - 1:i[1]] = self.cv2.weight.data.clone()
62+
w[:, :, i[0]:i[0] + 1, i[1]:i[1] + 1] = self.cv2.weight.data.clone()
6363
self.conv.weight.data += w
6464
self.__delattr__('cv2')
6565

0 commit comments

Comments
 (0)