RuntimeError: The expanded size of the tensor (1) must match the existing size (80) at non-singleton dimension 3. Target sizes: [1, 3, 1, 1, 2]. Tensor sizes: [3, 48, 80, 2] #3
Hi, I am trying to run the realsence_track.py. This error exist. Would you please take a look and share your solution? Thanks.
Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done!
YOLOv5 🚀 v6.0-206-gc43439a torch 1.10.1+cu102 CPU
Fusing layers...
Model Summary: 270 layers, 7235389 parameters, 0 gradients
Traceback (most recent call last):
File "realsence_track.py", line 207, in
test = realsence()
File "realsence_track.py", line 86, in realsence
pred = model(img, augment=False)[0]
File "/home/chan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, *kwargs)
File "/home/chan/catkin_ws/src/personalize_hand/yolov5/yolov5/models/yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/home/chan/catkin_ws/src/personalize_hand/yolov5/yolov5/models/yolo.py", line 149, in _forward_once
x = m(x) # run
File "/home/chan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(input, **kwargs)
File "/home/chan/catkin_ws/src/personalize_hand/yolov5/yolov5/models/yolo.py", line 58, in forward
self.grid[i], self.anchor_grid[i] = self._make_grid(nx, ny, i)
RuntimeError: The expanded size of the tensor (1) must match the existing size (80) at non-singleton dimension 3. Target sizes: [1, 3, 1, 1, 2]. Tensor sizes: [3, 48, 80, 2]
Hi, I am trying to run the realsence_track.py. This error exist. Would you please take a look and share your solution? Thanks.
Loading weights from deep_sort_pytorch/deep_sort/deep/checkpoint/ckpt.t7... Done! YOLOv5 🚀 v6.0-206-gc43439a torch 1.10.1+cu102 CPU
Fusing layers... Model Summary: 270 layers, 7235389 parameters, 0 gradients Traceback (most recent call last): File "realsence_track.py", line 207, in
test = realsence()
File "realsence_track.py", line 86, in realsence
pred = model(img, augment=False)[0]
File "/home/chan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, *kwargs)
File "/home/chan/catkin_ws/src/personalize_hand/yolov5/yolov5/models/yolo.py", line 126, in forward
return self._forward_once(x, profile, visualize) # single-scale inference, train
File "/home/chan/catkin_ws/src/personalize_hand/yolov5/yolov5/models/yolo.py", line 149, in _forward_once
x = m(x) # run
File "/home/chan/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(input, **kwargs)
File "/home/chan/catkin_ws/src/personalize_hand/yolov5/yolov5/models/yolo.py", line 58, in forward
self.grid[i], self.anchor_grid[i] = self._make_grid(nx, ny, i)
RuntimeError: The expanded size of the tensor (1) must match the existing size (80) at non-singleton dimension 3. Target sizes: [1, 3, 1, 1, 2]. Tensor sizes: [3, 48, 80, 2]