Created
May 26, 2022 03:59
-
-
Save skyline75489/a082a53b68f5ae194ba28ee52bfb45a4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import onnx | |
import onnxruntime as ort | |
import numpy as np | |
from onnx import numpy_helper | |
new_onnx_file_path='./model.onnx' | |
ort_sess = ort.InferenceSession(new_onnx_file_path) | |
input_ids_ts=onnx.TensorProto() | |
input_ids_ts.ParseFromString(open('test_data_set_0\input_0.pb','rb').read()) | |
input_ids = numpy_helper.to_array(input_ids_ts) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment