I am using pytorch implementation of yolov4 and I wanted to train custom object detection model with image resolution 416x416 with following repo
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
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.