Skip to content

Can i train models in keras 3 and run them in keras 2? #20227

Answered by abhaskumarsinha
satyrmipt asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @satyrmipt

Any keras v3.0 model cannot run on keras v2+. The new keras.ops.* operations might need to be reverted to tf.* operations. The issues related to optimizer incompatibility might appear. Training of the model/model loop, if using custom loops is totally different in two versions and for the best results, the latest version has major bugfixes. It is highly recommended to stick to the latest version, along with porting the code to the new version according to the guide: https://keras.io/guides/migrating_to_keras_3/

Keras v2.* may not receive any major updates in the future and lacks the latest features including - quantization, LoRA, etc that are essential for modern models.

B…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by satyrmipt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants