This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v1.x] Update onnx support to work with onnx 1.7.0 with most CV models (
#19017) * fix pooling_convention warning when convert model to onnx (#18529) * fix pooling_convention warning * fix pooling_convention warning * fix lint Co-authored-by: JackieWu <[email protected]> * Prevent uninitialized variable error. * Initial work to get Dropout to work with onnx 1.7 * Remove trailing whitespace for pylint. * Fix tensor initialization for Dropout operator input. * Update Clip operator to support latest ONNX opset versions by moving min/max attributes to inputs. * Fix whitespace. * Add support for importing Dropout operator in ONNX opset version >= 12. * Add support for import ONNX opsets >= 11 to clip operator. * Add optional opset_version parameter that defaults to latest opset version supported by onnx. Pass this parameter to each graph layer when exporting. * Add optional parameter to create_model() that allows user to specify which onnx opset version they want to use when exporting, defaults to latest version supported by onnx. * Use opset_version argument to determine operator format. * Add a opset_version parameter to from_onnx() so at operator conversion time, we know what opset version to use. * For Clip and Dropout operators, use opset version from passed proto_obj, which reflects what opset version the onnx model uses. * Use same tolerances that are in master. * Change Pad operator to use inputs instead of attributes for newer opset versions. Check opset version instead of ONNX version for Pooling operator. * Add documentation opset_version parameter. * Add opset_version parameters to unit tests. * Add test script for testing inference with onnxruntime on CV models from gluon model zoo. * Add license and clean up imports. * Install onnxruntime in docker container for unit tests. * Add onnxruntime to test dependencies. * Install onnxruntime into CentOS docker image. * Disable testing squeezenet models for now. * Update onnx version. * Fix typo. * Use mx.image.imread instead of PIL module. * ONNX import: use Conv pad attribute for symmetrical padding (#18675) Signed-off-by: Serge Panev <[email protected]> * Install onnx in CentOS containers when installing python. * Update import and export of some ONNX ops to support newer opset versions - this gets all ONNX unit tests to pass with onnx 1.7. * Re-enable squeezenet model testings in onnxruntime. * Run the onnxruntime inference tests in the ONNX pipeline instead of normal unittests pipelines. * Add missed return value. * Refactor code based on review comment. * Since the onnx tests are only run on ubuntu_cpu images, we don't need to install onnx and onnxruntime in the CentOS containers. Co-authored-by: Liu, Hao <[email protected]> Co-authored-by: JackieWu <[email protected]> Co-authored-by: Joe Evans <[email protected]> Co-authored-by: Serge Panev <[email protected]>
- Loading branch information
1 parent
2d077db
commit b888d3c
Showing
13 changed files
with
458 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.