yolo_research icon indicating copy to clipboard operation
yolo_research copied to clipboard

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

Open IMP-3D opened this issue 3 years ago • 1 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

IMP-3D avatar Sep 04 '22 16:09 IMP-3D

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?

positive666 avatar Sep 05 '22 07:09 positive666

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.

github-actions[bot] avatar Oct 06 '22 02:10 github-actions[bot]