Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: shape is invalid for input of size ... #26

Open
thorstenbar opened this issue Jul 18, 2019 · 2 comments
Open

RuntimeError: shape is invalid for input of size ... #26

thorstenbar opened this issue Jul 18, 2019 · 2 comments

Comments

@thorstenbar
Copy link

Hello,
I followed the steps provided in the readme. But the resulting weights and config file throw an error when trying to use them in an yolov3 implementation.

Traceback (most recent call last):
  File "detect.py", line 48, in <module>
    model.load_darknet_weights(opt.weights_path)
  File "/home/_/Desktop/PyTorch-YOLOv3/models.py", line 315, in load_darknet_weights
    conv_w = torch.from_numpy(weights[ptr : ptr + num_w]).view_as(conv_layer.weight)
RuntimeError: shape '[125, 106, 3, 3]' is invalid for input of size 14720

Anyone has an idea why? I am using a trained model with 25 classes and yolov3-spp i followed the issue on yolov3-tiny to make it working. For the training i used batch=5, subdivisions=10, epoch=1, size=608 and dataset with 300.000 Pictures. Thanks.

@Chiaquan
Copy link

same error, have you fixed it?

@thorstenbar
Copy link
Author

Sorry i didn't fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants