Hello, I am trying to use this repository to prune my modified YOLOv4 model, but I am having trouble with the kernel sizes of the max pooling layers. They are of size 5, 9 and 13 (lines 771 - 792 of cfg file), and I need them to be 5, 6 and 8 respectively. When I change them I get the following error:
Traceback (most recent call last):
File "/home/alberto/yolov3-channel-and-layer-pruning/models.py", line 247, in forward
x = torch.cat([layer_outputs[i] for i in layers], 1)
RuntimeError: Sizes of tensors must match except in dimension 2. Got 16 and 15 (The offending index is 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 542, in <module>
train() # train normally
File "train.py", line 348, in train
pred = model(imgs)
File "/home/alberto/anaconda3/envs/pruning_yolo/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/alberto/yolov3-channel-and-layer-pruning/models.py", line 250, in forward
x = torch.cat([layer_outputs[i] for i in layers], 1)
RuntimeError: Sizes of tensors must match except in dimension 2. Got 16 and 15 (The offending index is 0)
Can someone help me with this issue? I don't understand why it cannot support these kernel sizes directly. Thanks
Hello, I am trying to use this repository to prune my modified YOLOv4 model, but I am having trouble with the kernel sizes of the max pooling layers. They are of size 5, 9 and 13 (lines 771 - 792 of cfg file), and I need them to be 5, 6 and 8 respectively. When I change them I get the following error:
Can someone help me with this issue? I don't understand why it cannot support these kernel sizes directly. Thanks