-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
Can't load yolov3 onnx (v1.5) model: KeyError: key :Pad not found #24
Comments
Looks like we need to implement the This should probably just be a straightforward addition to |
Pad and Gather are the two new ops we need. @dhairyagandhi96 Are you still interested in looking into these? |
Yup, I was wondering though that if we need some very specific ops defined to get the models running, would it not be okay to also carry those ops as function definitions (or a "ONNXops.jl" dependency) in the model file? |
@dhairyagandhi96 Yes, if the ops involve specific operations (that cannot be written with Base/Flux functions), it'd be better to write them out as functions to the model.jl file. |
Definitely, these ops can be written in base, the only overhead is defining the functions such that they are available to the model when it is run. |
Are you interested in a new package that just contains the bigger ops functions? That'd make it easier to define and update ops in the future. |
I'm not sure if I'm the right person to help implement this, as I'm pretty naive to Flux and ONNX inner workings.. but I am keen to get this working, so happy to help if I can get some direction! |
I'm having a similar problem loading a onnx (v1.5) model. ONNX.load_model("model.onnx")
ERROR: KeyError: key :ConvTranspose not found
Stacktrace:
[1] getindex(::Dict{Symbol,Any}, ::Symbol) at ./dict.jl:478
[2] _graph(::ONNX.Types.Graph) at /home/timclements/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:0
[3] graph(::ONNX.Types.Graph) at /home/timclements/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:92
[4] code(::ONNX.Types.Graph) at /home/timclements/.julia/packages/ONNX/iz0dL/src/graph/graph.jl:100
[5] write_julia_file(::String) at /home/timclements/.julia/packages/ONNX/iz0dL/src/convert.jl:235
[6] load_model(::String) at /home/timclements/.julia/packages/ONNX/iz0dL/src/convert.jl:250
[7] top-level scope at none:0 It looks like the |
@tclements can you file an issue with a title like "Implement ConvTranspose operator"? These key errors are just missing operators that need to be implemented (onnx apparently keeps adding lots of them), so filing an issue for each one will make it easier to track which are missing. |
@jpsamaroo will do! |
I'm trying to load in the YOLOv3 ONNX (v1.5) model from: https://github.com/onnx/models/tree/master/vision/object_detection_segmentation/yolov3
with:
But during
load_model()
after weights.bson has started to populate, I hit:cc. @staticfloat
The text was updated successfully, but these errors were encountered: