Open TeunHuijben opened 3 months ago
+Alexander Mordvintsev @.> +Eyvind Niklasson @.> since they may help!
On Fri, Aug 9, 2024 at 2:00 AM Teun Huijben @.***> wrote:
Hi @znah https://github.com/znah, @oteret https://github.com/oteret, others,
First of all, my compliments on the amazing article!
I was having a look at the Google Colab notebook https://colab.research.google.com/github/google-research/self-organising-systems/blob/master/notebooks/growing_ca.ipynb provided with the original Growing NCA Distill https://distill.pub/2020/growing-ca/ 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! 🙌
— Reply to this email directly, view it on GitHub https://github.com/distillpub/post--growing-ca/issues/15, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHXOI6YZAAZ26OMMA2X5V3ZQQBDFAVCNFSM6AAAAABMHOJDN6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ2TMOBVGU2TIOA . You are receiving this because you were mentioned.Message ID: @.***>
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=trainlog/0000". This can be solved by changingca.save_weights(base_fn)
toca.save_weights(base_fn + '.weights.h5')
inexport_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 theCHECKPOINT
setting which should use the model that was just trained. When inspecting the HTML, it appears to fail when when parsing the content from themodel.json
file in/train_log
.I have the feeling it is because of the updated
tf
ortf.keras
version. When running the default notebook, it uses versionstf = 2.17.0
andtf.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! 🙌