Open zeobec opened 3 weeks ago
@zeobec You should note the definition of the Conv in YOLOv10. Try to use this GSConv:
class GSConv(nn.Module):
# GSConv https://github.com/AlanLi1997/slim-neck-by-gsconv
def __init__(self, c1, c2, k=1, s=1, g=1, d=1, act=True):
super().__init__()
c_ = c2 // 2
self.cv1 = Conv(c1, c_, k, s, None, g, d, act)
self.cv2 = Conv(c_, c_, 5, 1, None, c_, d, act)
def forward(self, x):
x1 = self.cv1(x)
x2 = torch.cat((x1, self.cv2(x1)), 1)
# shuffle
y = x2.reshape(x2.shape[0], 2, x2.shape[1] // 2, x2.shape[2], x2.shape[3])
y = y.permute(0, 2, 1, 3, 4)
return y.reshape(y.shape[0], -1, y.shape[3], y.shape[4])
I have not checked the definition of "Conv" in YOLOv10 yet, so please don't hesitate to let me know if you have any further questions.
Currently, im trying to implement GSConv module into Yolov10b module. conv.py
task.py
also imported module in init.py
.yaml
however, i received this error message
What's the possible reason that could be the source of the error?