'if_offset' and 'device'?
FRC1221 opened this issue · comments
-
Traceback (most recent call last):
File "E:\yolov5-7.0\models\yolo.py", line 386, in
model = Model(opt.cfg).to(device)
File "E:\yolov5-7.0\models\yolo.py", line 189, in init
self.model, self.save = parse_model(deepcopy(self.yaml), ch=[ch]) # model, savelist
File "E:\yolov5-7.0\models\yolo.py", line 358, in parse_model
m_ = nn.Sequential(*(m(*args) for _ in range(n))) if n > 1 else m(*args) # module
File "E:\yolov5-7.0\models\common.py", line 1861, in init
self.conv = DSConv(c1, c2, k, s, autopad(k, p, d))
TypeError: init() missing 2 required positional arguments: 'if_offset' and 'device' -
添加后
-
File "E:\yolov5-7.0\models\common.py", line 1861, in init
self.conv = DSConv(c1, c2, k, s, autopad(k, p, d), if_offset, device)
NameError: name 'if_offset' is not defined