Skip to content

Commit

Permalink
Update preprocessing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jun 30, 2021
1 parent a969b08 commit 3e60165
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion guides/ipynb/preprocessing_layers.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"- `RandomRotation` layer\n",
"- `RandomZoom` layer\n",
"- `RandomHeight` layer\n",
"- `RandomWidth` layer"
"- `RandomWidth` layer\n",
"- `RandomContrast` layer"
]
},
{
Expand Down
21 changes: 11 additions & 10 deletions guides/md/preprocessing_layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ are only active during training.
- `RandomZoom` layer
- `RandomHeight` layer
- `RandomWidth` layer
- `RandomContrast` layer

---
## The `adapt()` method
Expand Down Expand Up @@ -293,9 +294,9 @@ model.fit(train_dataset, steps_per_epoch=5)

<div class="k-default-codeblock">
```
5/5 [==============================] - 12s 576ms/step - loss: 8.7839
5/5 [==============================] - 23s 931ms/step - loss: 9.5173
<tensorflow.python.keras.callbacks.History at 0x1550b7110>
<tensorflow.python.keras.callbacks.History at 0x1625d0890>
```
</div>
Expand Down Expand Up @@ -329,9 +330,9 @@ model.fit(x_train, y_train)

<div class="k-default-codeblock">
```
1563/1563 [==============================] - 2s 910us/step - loss: 2.1323
1563/1563 [==============================] - 4s 2ms/step - loss: 2.1302
<tensorflow.python.keras.callbacks.History at 0x15727b8d0>
<tensorflow.python.keras.callbacks.History at 0x1647a2710>
```
</div>
Expand Down Expand Up @@ -505,14 +506,14 @@ Encoded text:
<div class="k-default-codeblock">
```
Training model...
1/1 [==============================] - 2s 2s/step - loss: 0.5292
1/1 [==============================] - 4s 4s/step - loss: 0.4916
```
</div>

<div class="k-default-codeblock">
```
Calling end-to-end model on test string...
Model output: tf.Tensor([[0.01447889]], shape=(1, 1), dtype=float32)
Model output: tf.Tensor([[0.02326627]], shape=(1, 1), dtype=float32)
```
</div>
Expand Down Expand Up @@ -590,14 +591,14 @@ Encoded text:
<div class="k-default-codeblock">
```
Training model...
1/1 [==============================] - 0s 222ms/step - loss: 1.4333
1/1 [==============================] - 1s 583ms/step - loss: 0.3378
```
</div>

<div class="k-default-codeblock">
```
Calling end-to-end model on test string...
Model output: tf.Tensor([[-0.89536154]], shape=(1, 1), dtype=float32)
Model output: tf.Tensor([[0.7227254]], shape=(1, 1), dtype=float32)
```
</div>
Expand Down Expand Up @@ -673,14 +674,14 @@ Encoded text:
<div class="k-default-codeblock">
```
Training model...
1/1 [==============================] - 0s 216ms/step - loss: 19.4452
1/1 [==============================] - 1s 551ms/step - loss: 3.5459
```
</div>

<div class="k-default-codeblock">
```
Calling end-to-end model on test string...
Model output: tf.Tensor([[-0.36555034]], shape=(1, 1), dtype=float32)
Model output: tf.Tensor([[0.51119524]], shape=(1, 1), dtype=float32)
```
</div>
Expand Down
1 change: 1 addition & 0 deletions guides/preprocessing_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- `RandomZoom` layer
- `RandomHeight` layer
- `RandomWidth` layer
- `RandomContrast` layer
"""

Expand Down

0 comments on commit 3e60165

Please sign in to comment.