1

I trained a keras sequential model while working in colab. Now I shifted to a PC with Windows 11. jupyter notebook with Tensorflow 2.10 is unable to read that model. it needs a model in the old .h5 version. I tried converting the model into .h5 in colab but there is still a compatibility issue. I can't upgrade tensorflow because 2.10 was the last version that could run in Windows. One option is to use ubuntu in the same PC but I'm not comfortable with it. Can anyone suggest how to make the trained model compatible with tensorflow 2.10?

3
  • 1
    I can't upgrade tensorflow because 2.10 was the last version that could run in Windows - that's not exactly what they write. For using an already trained model you could very well try tensorflow-cpu. Commented Oct 10 at 6:44
  • 1
    Option 1: In windows, use WSL, and install latest version of the packages. Option 2: In colab, if you can save the model in TF SavedModel format (assuming TF backend), you can most likely reload it to older TF package. I would suggest to go with Option 1, don't hold back to old package, otherwise you'll face any issue in coming days. Commented Oct 10 at 10:04
  • To make your model compatible, save Architecture (JSON) and Weights (h5) separately, i.e., architecture as a JSON file and its weights as an .h5 file. Then, use those two files to reliably reconstruct the model on your Windows machine. Also, the Option 1 idea to switch to WSL is technically correct for long-term stability. Commented Oct 14 at 8:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.