Skip to content

Support Keras 3 models in from_keras #2398

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nfirle
Copy link

@nfirle nfirle commented Jun 12, 2025

Summary

This PR adds support for Keras 3 in the from_keras conversion function. Keras 3 introduced several breaking changes in model serialization and internal APIs, which caused the existing conversion logic to fail. This update ensures compatibility with the new format.

Changes

  • Added a new function from_keras3 that handles models created with Keras 3.
  • Updated from_keras to detect the Keras version and delegate to from_keras3 when necessary.
  • The from_keras3 function is designed to also work with older Keras versions, but for full backward compatibility, the original from_keras logic is preserved.
  • This approach minimizes the risk of regressions and keeps the behavior consistent for users still relying on Keras 2.

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.

1 participant