vision
vision copied to clipboard
does deformable conv support export to onnx?
Does deformable conv support export to onnx or not?
Not at the moment. Contributions welcome
Not at the moment. Contributions welcome
@fmassa
I implemented ONNX exporter for deform_conv2d
with pure ONNX operators, i.e. no custom layers, in my repository deform_conv2d_onnx_exporter
.
My module, deform_conv2d_onnx_exporter
, registers ONNX operator for torchvision::deform_conv2d
.
Because the latest version of ONNX does not support deform_conv2d
natively, I had to implement my module using GatherND
and other operators.
Therefore, the performance of my module is not very good, but good enough for me.
It requires opset version 12 and later because it uses version 12 GatherND
and Clip
operators.
Is this helpful for this project? If yes, I would like to create a pull request to this project.
Regards, Murase
Not at the moment. Contributions welcome
@fmassa I implemented ONNX exporter for
deform_conv2d
with pure ONNX operators, i.e. no custom layers, in my repositorydeform_conv2d_onnx_exporter
.My module,
deform_conv2d_onnx_exporter
, registers ONNX operator fortorchvision::deform_conv2d
. Because the latest version of ONNX does not supportdeform_conv2d
natively, I had to implement my module usingGatherND
and other operators. Therefore, the performance of my module is not very good, but good enough for me. It requires opset version 12 and later because it uses version 12GatherND
andClip
operators.Is this helpful for this project? If yes, I would like to create a pull request to this project.
Regards, Murase
Hi @masamitsu-murase,
Thanks for the contribution. I do not see the repository. Is the link broken?
Thanks
I re-published deform-conv2d-onnx-exporter.
I re-published deform-conv2d-onnx-exporter.
File "D:\ProgramData\anaconda3\envs\propainter\lib\site-packages\deform_conv2d_onnx_exporter.py", line 66, in tensor return g.op("Constant", value_t=torch.tensor(value, dtype=dtype)) TypeError: an integer is required (got type NoneType) (Occurred when translating deform_conv2d).
There is now native support for DeformConv in ONNX. So how to export model into onnx without getting an error "torchvision::deform_conv2d unimplemented"?