I am trying to learn Keras3 for R via the RStudio tutorials for "Tensor Flow for R" Keras chapters. The version currently available at TensorFlow for R - Tutorials haven't evidently been updated to deal with the Keras update to Keras3. Most of the code in these chapters appears to work fine with Keras3, but there are several areas where the code produces errors -- such as those dealing with saving and restoring models, the use of the TensorBoard, and coding of models with regularization layers.
Have the Tensorflow for R chapters dealing with Keras been updated to Keras3, and if so, are these updated versions available anywhere?
I want to thank the authors of Tensorflow for R. The tutorials have been very helpful to me, even giving my problems with the areas where the update of Keras seems to have broken the code.
Thanks in advance for any help with the above. Larry Hunsicker
Hi, thanks for opening. The tensorflow tutorials have not yet been updated for keras3. There are up-to-date examples on the keras website: Keras examples • keras3.
If there are specific errors you're encountering and are unsure how to overcome them, reach out here or open a github issue.
For saving, generally replace
keras::save_model_tf(model, "my-saved-model")
with
keras3::save_model(model, "my-saved-model.keras")
The tensorboard callback callback_tensorboard()
should work similarly across the two versions (some arguments did change).
Regularization layers: which layer and what error are you encountering? The axis
argument for some layers changed from being 0-based to 1-based for positive integers in keras3
, you might be encountering that.
This solved my problem. Mny thanks. Larry Hunsicker
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.