Skip to content
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

Scope onnx-simplifier requirements check #4730

Merged
merged 2 commits into from
Sep 9, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion export.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def export_onnx(model, img, file, opset, train, dynamic, simplify):
# ONNX model export
prefix = colorstr('ONNX:')
try:
check_requirements(('onnx', 'onnx-simplifier'))
check_requirements(('onnx'))
import onnx

print(f'\n{prefix} starting export with onnx {onnx.__version__}...')
Expand All @@ -66,6 +66,7 @@ def export_onnx(model, img, file, opset, train, dynamic, simplify):
# Simplify
if simplify:
try:
check_requirements(('onnx-simplifier'))
import onnxsim

print(f'{prefix} simplifying with onnx-simplifier {onnxsim.__version__}...')
Expand Down