Skip to content

fix: guard from_keras() output-name lookup against missing names - #2477

Draft
pctablet505 wants to merge 1 commit into
onnx:mainfrom
pctablet505:fix-2448-keras-output-names
Draft

fix: guard from_keras() output-name lookup against missing names#2477
pctablet505 wants to merge 1 commit into
onnx:mainfrom
pctablet505:fix-2448-keras-output-names

Conversation

@pctablet505

Copy link
Copy Markdown

Fixes #2448

Guards the output-name lookup in from_keras() so auto-generated model.output_names entries that aren't present in the concrete function mapping fall back to the concrete function outputs instead of raising KeyError.

When Keras auto-generates model.output_names entries that are not present
in the concrete function's structured output mapping, fall back to the
concrete function output names instead of raising KeyError.

Fixes onnx#2448

Signed-off-by: pctablet505 <pctablet505@gmail.com>
@pctablet505
pctablet505 force-pushed the fix-2448-keras-output-names branch from 2dd5673 to c88187d Compare August 21, 2026 15:18
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.

KeyError: 'keras_tensor_65' on tf2onnx.convert.from_keras()

1 participant