@@ -991,10 +991,10 @@ def spconv(c1, c2, k): return nn.Sequential(Conv(c1,c1,k,g=c1),Conv(c1,c2,1))
991991 self .dfl = dfl
992992 self .reg_max = 16 if dfl else 1
993993 self .strides = [8 , 16 , 32 ]
994- self . c2 = max ((16 , ch [0 ] // 4 , self .reg_max * 4 ))
995- self . c3 = max (ch [0 ], min (self . nc , 100 )) # channels
996- 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 )
997- self .cv3 = nn .ModuleList (nn .Sequential (conv (x , self . c3 , 3 ), conv (self . c3 , self . c3 , 3 ), nn .Conv2d (self . c3 , self .nc , 1 )) for x in ch )
994+ c2 = max ((16 , ch [0 ] // 4 , self .reg_max * 4 ))
995+ c3 = max (ch [0 ], min (nc , 100 )) # channels
996+ self .cv2 = nn .ModuleList (nn .Sequential (Conv (x , c2 , 3 ), Conv (c2 , c2 , 3 ), nn .Conv2d (c2 , 4 * self .reg_max , 1 )) for x in ch )
997+ self .cv3 = nn .ModuleList (nn .Sequential (conv (x , c3 , 3 ), conv (c3 , c3 , 3 ), nn .Conv2d (c3 , self .nc , 1 )) for x in ch )
998998 self .r = nn .Parameter (torch .arange (self .reg_max ).float (), requires_grad = False ) if dfl else None
999999 if end2end : self .one2one_cv2 = deepcopy (self .cv2 )
10001000 if end2end : self .one2one_cv3 = deepcopy (self .cv3 )
0 commit comments