Skip to content

Commit ce069dd

Browse files
author
me
committed
removed self.no
1 parent bcc8ead commit ce069dd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/models.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -987,11 +987,10 @@ def __init__(self, nc=80, ch=(), dfl=True, separable=False, end2end=False):
987987
super().__init__()
988988
def spconv(c1, c2, k): return nn.Sequential(Conv(c1,c1,k,g=c1),Conv(c1,c2,1))
989989
conv = spconv if separable else Conv
990-
self.nc = nc # number of classes
990+
self.nc = nc
991991
self.dfl = dfl
992-
self.reg_max = 16 if dfl else 1 # DFL channels (ch[0] // 16 to scale 4/8/12/16/20 for n/s/m/l/x)
993-
self.no = nc + self.reg_max * 4 # number of outputs per anchor
994-
self.strides = [8, 16, 32] # strides computed during build
992+
self.reg_max = 16 if dfl else 1
993+
self.strides = [8, 16, 32]
995994
self.c2 = max((16, ch[0] // 4, self.reg_max * 4))
996995
self.c3 = max(ch[0], min(self.nc, 100)) # channels
997996
self.cv2 = nn.ModuleList(nn.Sequential(Conv(x, self.c2, 3), Conv(self.c2, self.c2, 3), nn.Conv2d(self.c2, 4 * self.reg_max, 1)) for x in ch)

0 commit comments

Comments
 (0)