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

Tom/onnx2py #161

Merged
merged 4 commits into from
Dec 23, 2020
Merged

Tom/onnx2py #161

merged 4 commits into from
Dec 23, 2020

Conversation

TomWildenhain-Microsoft
Copy link
Contributor

@TomWildenhain-Microsoft TomWildenhain-Microsoft commented Dec 22, 2020

Created a script onnx2py that converts an onnx model into a python file. The resulting python file uses the onnx.helper python API to recreate the original model. Editing the file allows for easy editing of the ONNX model.

@TomWildenhain-Microsoft TomWildenhain-Microsoft force-pushed the tom/onnx2py branch 3 times, most recently from 659b880 to db3648c Compare December 23, 2020 00:06
import numpy as np
import os

from onnxconverter_common.pytracing import TracingObject
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'from .pytracing ...' not working?

"""
Converts onnx model into model.py file for easy editing. Resulting model.py file uses onnx.helper library to
recreate the original onnx model. Constant tensors with more than 10 elements are saved into .npy
files in location model/cont#.npy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tensorname + cont#?

@TomWildenhain-Microsoft TomWildenhain-Microsoft merged commit e86e275 into master Dec 23, 2020
@TomWildenhain-Microsoft TomWildenhain-Microsoft deleted the tom/onnx2py branch December 23, 2020 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants