Skip to content

Commit

Permalink
Update transfer_learning_with_hub.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
tilakrayal authored Dec 19, 2024
1 parent bcdf8e0 commit ef90822
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions site/en/tutorials/images/transfer_learning_with_hub.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"\n",
"This tutorial demonstrates how to:\n",
"\n",
"1. Use models from TensorFlow Hub with `keras`.\n",
"1. Use models from TensorFlow Hub with `tf.keras`.\n",
"1. Use an image classification model from TensorFlow Hub.\n",
"1. Do simple transfer learning to fine-tune a model for your own image classes."
]
Expand Down Expand Up @@ -340,7 +340,7 @@
"id": "jFHdp18ccah7"
},
"source": [
"First, load this data into the model using the image data off disk with `keras.utils.image_dataset_from_directory`, which will generate a `tf.data.Dataset`:"
"First, load this data into the model using the image data off disk with `tf.keras.utils.image_dataset_from_directory`, which will generate a `tf.data.Dataset`:"
]
},
{
Expand Down Expand Up @@ -401,7 +401,7 @@
"id": "L0Btd0V3C8h4"
},
"source": [
"Second, because TensorFlow Hub's convention for image models is to expect float inputs in the `[0, 1]` range, use the `keras.layers.Rescaling` preprocessing layer to achieve this."
"Second, because TensorFlow Hub's convention for image models is to expect float inputs in the `[0, 1]` range, use the `tf.keras.layers.Rescaling` preprocessing layer to achieve this."
]
},
{
Expand All @@ -410,7 +410,7 @@
"id": "Rs6gfO-ApTQW"
},
"source": [
"Note: You could also include the `keras.layers.Rescaling` layer inside the model. Refer to the [Working with preprocessing layers](https://www.tensorflow.org/guide/keras/preprocessing_layers) guide for a discussion of the tradeoffs."
"Note: You could also include the `tf.keras.layers.Rescaling` layer inside the model. Refer to the [Working with preprocessing layers](https://www.tensorflow.org/guide/keras/preprocessing_layers) guide for a discussion of the tradeoffs."
]
},
{
Expand Down Expand Up @@ -622,7 +622,7 @@
"source": [
"### Attach a classification head\n",
"\n",
"To complete the model, wrap the feature extractor layer in a `keras.Sequential` model and add a fully-connected layer for classification:"
"To complete the model, wrap the feature extractor layer in a `tf.keras.Sequential` model and add a fully-connected layer for classification:"
]
},
{
Expand Down Expand Up @@ -673,7 +673,7 @@
"source": [
"### Train the model\n",
"\n",
"Use `Model.compile` to configure the training process and add a `keras.callbacks.TensorBoard` callback to create and store logs:"
"Use `Model.compile` to configure the training process and add a `tf.keras.callbacks.TensorBoard` callback to create and store logs:"
]
},
{
Expand Down

0 comments on commit ef90822

Please sign in to comment.