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

Outdated Tensorflow version in Google Colab #15

Open
TeunHuijben opened this issue Aug 9, 2024 · 1 comment
Open

Outdated Tensorflow version in Google Colab #15

TeunHuijben opened this issue Aug 9, 2024 · 1 comment

Comments

@TeunHuijben
Copy link

Hi @znah, @oteret, others,

First of all, my compliments on the amazing article!

I was having a look at the Google Colab notebook provided with the original Growing NCA Distill article.

When running the notebook, I encountered an error, and it might originate from incompatibility with the newer version of TensorFlow (and tf.keras). The two things I encountered:

  • when the training loop tries to save the model using export_model, I get the following error: "ValueError: The filename must end in .weights.h5. Received: filepath=train_log/0000". This can be solved by changing ca.save_weights(base_fn) to ca.save_weights(base_fn + '.weights.h5') in export_model

  • when making this adjustment in export_model, I am no longer able to run the interactive demo cell "TensorFlow.js Demo" at the end of the notebook. The demo works perfectly for the pre-computed models, but not for the CHECKPOINT setting which should use the model that was just trained. When inspecting the HTML, it appears to fail when when parsing the content from the model.json file in /train_log.

I have the feeling it is because of the updated tf or tf.keras version. When running the default notebook, it uses versions tf = 2.17.0 and tf.keras = 3.4.1, which might be newer versions than when the notebook was originally published. Do you maybe know what the problem could be? And would you have a solution to get the interactive demo working on newly trained models?

Thanks a lot for the help! 🙌

@oteret
Copy link
Contributor

oteret commented Aug 26, 2024 via email

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

No branches or pull requests

2 participants