From 1d9536b49141db790cef4110a6c576eaffdd40a9 Mon Sep 17 00:00:00 2001 From: sanjana7668-eng Date: Fri, 7 Aug 2026 16:18:45 -0400 Subject: [PATCH] Fix Keras Model submodules attribute error in intro_to_modules guide Replaced .submodules with .layers on my_sequential_model instance since tf.keras.Model does not have a submodules attribute. Closes tensorflow/tensorflow#97403 --- site/en/guide/intro_to_modules.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/en/guide/intro_to_modules.ipynb b/site/en/guide/intro_to_modules.ipynb index 79bbe89ca56..1ced209b4e6 100644 --- a/site/en/guide/intro_to_modules.ipynb +++ b/site/en/guide/intro_to_modules.ipynb @@ -943,7 +943,7 @@ "id": "8i-CR_h2xw3z" }, "source": [ - "All the same features are available, including tracking variables and submodules.\n", + "All the same features are available, including tracking variables and layers.\n", "\n", "Note: A raw `tf.Module` nested inside a Keras layer or model will not get its variables collected for training or saving. Instead, nest Keras layers inside of Keras layers." ] @@ -967,7 +967,7 @@ }, "outputs": [], "source": [ - "my_sequential_model.submodules" + "my_sequential_model.layers" ] }, {