-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Implement some ONNX exports, needed for SSD #18055
Conversation
Hey @RuRo , Thanks for submitting the PR
CI supported jobs: [windows-gpu, centos-gpu, windows-cpu, miscellaneous, clang, unix-gpu, centos-cpu, website, sanity, edge, unix-cpu] Note: |
commit bc7426a Author: Andrey Stotskiy <[email protected]> Date: Thu Apr 16 15:46:55 2020 +0300 add export only test cases for topk and slice_axis commit 7252018 Author: Andrey Stotskiy <[email protected]> Date: Tue Apr 14 17:59:11 2020 +0300 bump onnx version to 1.5 commit b1672cb Author: Andrey Stotskiy <[email protected]> Date: Sun Mar 1 11:45:45 2020 +0300 implement onnx translation helpers
Jenkins CI successfully triggered : [unix-gpu] |
Hi, |
@VisionZQ This PR currently has WIP status (it's not ready) and it's main purpose was to implement the needed ops to convert I would recommend, that you open an issue, describing, which layers needed for |
It's a great job! |
Really good job! When I convert yolov3 model in gluoncv to ONNX, I'm faced with the same problem. |
Description
This is a WIP pull request for implementing exports for some
ONNX
operators, which are needed to successfully export theSSD
model fromgluocv
. The only 2 operators, which are not yet implemented are_contrib_box_decode
, which can be sidestepped by usingSSD(minimal_opset=True)
and_contrib_box_nms
, which could be potentially implemented with theNonMaxSuppression
ONNX
operator, but this is a big enough undertaking to be its own separate PR.This PR assumes that #18054 is merged (ruro/onnx_version_bump), since it uses some
ONNX
operators only available inv1.5.0
. (The first commit is a squashed version of that PR and will be dropped after it gets merged into master)If you actually want to try exporting
SSD
, you should also merge #17827 (QueensGambit/onnx_export_slice_fix or ruro/onnx_export_slice_fix).Changes
eagerly check onnx conversion availability in verbose mode
The
export_model
method now warns about all nodes, that don't have a registered conversion before trying to export the model, ifverbose=True
. This is a simple quality of life change, which helps potential contributors to estimate, how many layers are missing until a model can be exported._arange
op(doesn't support the
repeat
attribute for now)ones_like
andzeros_like
ops_lesser_scalar
,_greater_scalar
and_equal_scalar
opsalso fixes the issue, where the
scalar_op_helper
would fail, if the input is a non-1D initializerslice_like
op(doesn't support the implicit
axes
variation right now)where
op