I'm using weights I trained on the original darknet repo, and just updated the yolov3-tiny.cfg file with 3 classes (and changed the filters in the prior layer to 24), but I am getting a mismatched tensor error. I printed out x1 and x2 and I get the respective values:
x1: torch.Size([1, 128, 30, 30])
x2: torch.Size([1, 256, 27, 27])
Any advice?
Traceback (most recent call last):
File "demo.py", line 213, in <module>
detect(cfgfile, weightfile,imgfile)
File "demo.py", line 46, in detect
boxes = do_detect(m, sized, 0.5, 0.4, use_cuda)
File "/Users/vkrd/Documents/Projects/pytorch-YOLOv4/tool/utils.py", line 420, in do_detect
list_boxes = model(img)
File "/Users/vkrd/anaconda3/lib/python3.7/site-packages/torch/nn/modules/module.py", line 550, in __call__
result = self.forward(*input, **kwargs)
File "/Users/vkrd/Documents/Projects/pytorch-YOLOv4/tool/darknet2pytorch.py", line 144, in forward
x = torch.cat((x1, x2), 1)
RuntimeError: Sizes of tensors must match except in dimension 1. Got 30 and 27 in dimension 2
I'm using weights I trained on the original darknet repo, and just updated the yolov3-tiny.cfg file with 3 classes (and changed the filters in the prior layer to 24), but I am getting a mismatched tensor error. I printed out x1 and x2 and I get the respective values: x1:
torch.Size([1, 128, 30, 30])
x2:torch.Size([1, 256, 27, 27])
Any advice?