You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of the intermediate node cannot be obtained in onnxruntime.InferenceSession for the ONNX model whose size exceeds 2 GB.
Currently, when onnxruntime python package is used, if you want to obtain the output of the middle layer node of a ONNX model, you must use model.graph.output.extend([onnx.ValueInfoProto(name=name)]) to specify the node name after onnx.load(path), and then initialize InferenceSession. However, when initializing InferenceSession by loading the onnx model class, you need to pass the result of model.SerializeToString(), which does not support Onnx models larger than 2GB :(
To reproduce
Normally, we use following codes to obtain the output of the intermediate node:
This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.
Describe the issue
The output of the intermediate node cannot be obtained in
onnxruntime.InferenceSession
for the ONNX model whose size exceeds 2 GB.Currently, when
onnxruntime
python package is used, if you want to obtain the output of the middle layer node of a ONNX model, you must usemodel.graph.output.extend([onnx.ValueInfoProto(name=name)])
to specify the node name afteronnx.load(path)
, and then initializeInferenceSession
. However, when initializingInferenceSession
by loading the onnx model class, you need to pass the result ofmodel.SerializeToString()
, which does not support Onnx models larger than 2GB :(To reproduce
Normally, we use following codes to obtain the output of the intermediate node:
However, if the onnx model is larger than 2GB, the
SerializeToString()
will raise ERROR:Is there a possible solution to this awkward situation?
Thank you very much.
Urgency
No response
Platform
Linux
OS Version
Ubuntu 9.4.0-1ubuntu1~20.04.2
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.18.1
ONNX Runtime API
Python
Architecture
X64
Execution Provider
Default CPU
Execution Provider Library Version
No response
The text was updated successfully, but these errors were encountered: