daquexian / onnx-simplifier

Simplify your onnx model
Apache License 2.0
3.82k stars 381 forks source link

[BUG] max_unpool2d not supported #44

Open EyalEnav opened 4 years ago

EyalEnav commented 4 years ago

Hi, I am seeing: onnx.onnx_cpp2py_export.checker.ValidationError: No Op registered for max_unpool2d with domain_version of 9

==> Context: Bad node spec: input: "276" input: "281" input: "284" output: "285" op_type: "max_unpool2d"

The model is plain pytorch segnet

daquexian commented 4 years ago

Thanks for your report!

Could you please send your onnx model to daquexian566@gmail.com? Thanks

ahangchen commented 3 years ago

@daquexian I‘m using grid sample op in pytorch, when converted to onnx, I write a custom op like: this. is there any way to add custom op in onnx_simpiler?

daquexian commented 3 years ago

@ahangchen Thanks for your question. onnx-simplifier v0.3.0 allows you add custom onnx op through onnxruntime plugin. If your custom op is implemented as an onnxruntime plugin, you can upgrade your onnxsim version and pass --custom-lib the_path_of_the_lib when running onnxsim