2020-12-29 18:56:14

This commit is contained in:
wizardforcel
2020-12-29 18:56:15 +08:00
parent 86a3892422
commit 6ae3ae8bb1
38 changed files with 64 additions and 64 deletions

View File

@@ -220,7 +220,7 @@ The RGB channel values are in the `[0, 255]` range. This is not ideal for a neur
normalization_layer = layers.experimental.preprocessing.Rescaling(1./255)
```
<aside class="note">**Note:** The Keras Preprocessing utilities and layers introduced in this section are currently experimental and may change.</aside>
**Note:** The Keras Preprocessing utilities and layers introduced in this section are currently experimental and may change.
There are two ways to use this layer. You can apply it to the dataset by calling map:
@@ -239,7 +239,7 @@ print(np.min(first_image), np.max(first_image))
Or, you can include the layer inside your model definition, which can simplify deployment. Let's use the second approach here.
<aside class="note">**Note:** you previously resized images using the `image_size` argument of `image_dataset_from_directory`. If you want to include the resizing logic in your model as well, you can use the [Resizing](https://tensorflow.google.cn/api_docs/python/tf/keras/layers/experimental/preprocessing/Resizing) layer.</aside>
**Note:** you previously resized images using the `image_size` argument of `image_dataset_from_directory`. If you want to include the resizing logic in your model as well, you can use the [Resizing](https://tensorflow.google.cn/api_docs/python/tf/keras/layers/experimental/preprocessing/Resizing) layer.
# Create the model
@@ -574,7 +574,7 @@ plt.show()
Finally, let's use our model to classify an image that wasn't included in the training or validation sets.
<aside class="note">**Note:** Data augmentation and Dropout layers are inactive at inference time.</aside>
**Note:** Data augmentation and Dropout layers are inactive at inference time.
```
sunflower_url = "https://storage.googleapis.com/download.tensorflow.org/example_images/592px-Red_sunflower.jpg"