Node input 'X' is not a graph input, initializer, or output of a previous node. #2324
Unanswered
Onikage3x2
asked this question in
Q&A
Replies: 1 comment
-
Have you solved this issue? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Today, while attempting to use a previously converted Keras model (.h5) to ONNX, specifically a DDRNet 23 Slim model, I encountered this error message. It appears that some inputs were marked as optional, leading to the following issue. Is there a way to set default values for these inputs or designate them as non-optional? I might be on the wrong path with this approach, so any assistance would be greatly appreciated.
Here's the full error message:
onnxruntime.capi.onnxruntime_pybind11_state.InvalidArgument: [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Invalid model. Node input 'model_1/add_29/add:0' is not a graph input, initializer, or output of a previous node.
Additional information:
ONNX version: 1.10
The Keras model was created with TensorFlow 2.5.
Edit:
Here is some more context.
The error comes after a successfull check:
onnx.checker.check_model(onnx_model)
In line:
session = onnxruntime.InferenceSession(model_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
The input 'model_1/add_29/add:0' not a node, it's a connection.

Beta Was this translation helpful? Give feedback.
All reactions