positive666/yolo_research

TypeError: roll(): argument 'shifts' must be tuple of ints, not tuple

summer202203 opened this issue · 2 comments

❔Question

Additional context

Traceback (most recent call last):
File "train.py", line 680, in
main(opt)
File "train.py", line 575, in main
train(opt.hyp, opt, device, callbacks)
File "train.py", line 128, in train
model = Model(cfg, ch=3, nc=nc, anchors=hyp.get('anchors')).to(device) # create
File "/content/drive/MyDrive/yolov5/models/yolo.py", line 121, in init
m.stride = torch.tensor([s / x.shape[-2] for x in self.forward(torch.zeros(1, ch, s, s))]) # forward
File "/content/drive/MyDrive/yolov5/models/yolo.py", line 135, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/content/drive/MyDrive/yolov5/models/yolo.py", line 158, in _forward_once
x = m(x) # run
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "/content/drive/MyDrive/yolov5/models/common.py", line 715, in forward
x = torch.roll(x, shifts=(self.shift_size, self.shift_size), dims=(1, 2))
TypeError: roll(): argument 'shifts' must be tuple of ints, not tuple

I think you using a swinblock wrapped in yolov7, which is a shift of the wrong type, this is a complete YAML structure that I haven't sorted out yet, What's Your Run Command?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.