Skip to content
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

Add in-place modification of _token_embedding weights key for Keras 2 compatibility #1369

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

nkovela1
Copy link
Collaborator

This PR fixes a backwards compatibility issue with Keras 2 following the Kaggle integration.

Weights loaded in Keras 2 from Kaggle were originally saved in Keras 3, and the Keras 2 weights traversal order is the opposite of Keras 3.

This caused the _token_embedding attribute (where the weights were saved) to be ignored, since the public token_embedding attribute comes in reverse order first.

@nkovela1 nkovela1 added the kokoro:force-run Runs Tests on GPU label Dec 15, 2023
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Dec 15, 2023
@nkovela1 nkovela1 merged commit f9fc91e into keras-team:kaggle Dec 15, 2023
mattdangerw pushed a commit to mattdangerw/keras-hub that referenced this pull request Dec 26, 2023
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.

2 participants