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

Conv.W key not found for yolo onnx models #18

Open
IanButterworth opened this issue Feb 22, 2019 · 4 comments
Open

Conv.W key not found for yolo onnx models #18

IanButterworth opened this issue Feb 22, 2019 · 4 comments

Comments

@IanButterworth
Copy link

I'm trying to convert the tiny-yolo onnx models generated in this blog post, which are hosted here, and I'm getting the following errors:

>using Flux, ONNX
>ONNX.load_model("20180709 TinyYoloV3.onnx")
KeyError: key "Conv.W" not found

>ONNX.load_model("Tiny-YOLOv2.onnx")
KeyError: key "convolution.W" not found

Is this a peculiarity of these ONNX models, or an unsupported ONNX standard? I ask because I know that the tiny-yolov2 onnx model here does convert successfully (but is not accurate due to the asymmetrical padding issue with yolov2, hence why I'm trying to get yolov3 up and running)

@ayush1999
Copy link
Collaborator

@ianshmean There's an error in the onnx model itself: See onnx/models#60.

@IanButterworth
Copy link
Author

Ah ok. Is a workaround possible in the interim to just ignore keys that aren’t initialized?

@IanButterworth
Copy link
Author

Seems that it's an issue with <1.2 onnx, given the 1.0 version here is the only one that causes this issue. ONNX seems to have moved forward a lot since 1.0 so perhaps the best plan would be to generate newer ONNX models

@ayush1999
Copy link
Collaborator

You could try downloading the pretrained model in some other framework (PyTorch/TensorFlow) and use the newer version of onnx exporters to generate the onnx file, and load it in using this package. (Would also be a great addition for the onnx/models repo)

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