You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have same problem I faced few months ago but I am not able to solve. Is this implementation is not compatible with changing input image size.
In configuration file I changed image size form 608 to 416 as shown below
Cfg.width = 416
Cfg.height = 416
I got the following error.
Traceback (most recent call last):
File "./pytorch-YOLOv4/train.py", line 445, in
train(model=model,
File "./pytorch-YOLOv4/train.py", line 321, in train
loss, loss_xy, loss_wh, loss_obj, loss_cls, loss_l2 = criterion(bboxes_pred, bboxes)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "./pytorch-YOLOv4/train.py", line 205, in forward
pred[..., 0] += self.grid_x[output_id]
RuntimeError: The size of tensor a (52) must match the size of tensor b (19) at non-singleton dimension 3
Any help is appreciated.
The text was updated successfully, but these errors were encountered:
I have same problem I faced few months ago but I am not able to solve. Is this implementation is not compatible with changing input image size.
In configuration file I changed image size form 608 to 416 as shown below
Cfg.width = 416
Cfg.height = 416
I got the following error.
Traceback (most recent call last):
File "./pytorch-YOLOv4/train.py", line 445, in
train(model=model,
File "./pytorch-YOLOv4/train.py", line 321, in train
loss, loss_xy, loss_wh, loss_obj, loss_cls, loss_l2 = criterion(bboxes_pred, bboxes)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "./pytorch-YOLOv4/train.py", line 205, in forward
pred[..., 0] += self.grid_x[output_id]
RuntimeError: The size of tensor a (52) must match the size of tensor b (19) at non-singleton dimension 3
Any help is appreciated.
The text was updated successfully, but these errors were encountered: