Skip to content

Commit

Permalink
Fix functional API guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Jul 6, 2024
1 parent 8771d0c commit 1806537
Show file tree
Hide file tree
Showing 21 changed files with 179 additions and 163 deletions.
1 change: 1 addition & 0 deletions guides/_distributed_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Guide to multi-GPU & distributed training for Keras models.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
1 change: 1 addition & 0 deletions guides/_preprocessing_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Overview of how to leverage preprocessing layers to create end-to-end models.
Accelerator: GPU
"""

"""
## Keras preprocessing
Expand Down
1 change: 1 addition & 0 deletions guides/_working_with_rnns.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Complete guide to using & customizing RNN layers.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
1 change: 1 addition & 0 deletions guides/distributed_training_with_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Guide to multi-GPU/TPU training for Keras models with JAX.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
1 change: 1 addition & 0 deletions guides/distributed_training_with_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Guide to multi-GPU training for Keras models with TensorFlow.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
1 change: 1 addition & 0 deletions guides/distributed_training_with_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Guide to multi-GPU training for Keras models with PyTorch.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
3 changes: 2 additions & 1 deletion guides/functional_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Complete guide to the functional API.
Accelerator: GPU
"""

"""
## Setup
"""
Expand Down Expand Up @@ -402,7 +403,7 @@ def get_model():
"""

# Dummy input data
title_data = np.random.randint(num_words, size=(1280, 10))
title_data = np.random.randint(num_words, size=(1280, 12))
body_data = np.random.randint(num_words, size=(1280, 100))
tags_data = np.random.randint(2, size=(1280, num_tags)).astype("float32")

Expand Down
Binary file modified guides/img/functional_api/functional_api_22_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified guides/img/functional_api/functional_api_40_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified guides/img/functional_api/functional_api_51_0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions guides/intro_to_keras_for_engineers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: First contact with Keras 3.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
2 changes: 1 addition & 1 deletion guides/ipynb/functional_api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
"outputs": [],
"source": [
"# Dummy input data\n",
"title_data = np.random.randint(num_words, size=(1280, 10))\n",
"title_data = np.random.randint(num_words, size=(1280, 12))\n",
"body_data = np.random.randint(num_words, size=(1280, 100))\n",
"tags_data = np.random.randint(2, size=(1280, num_tags)).astype(\"float32\")\n",
"\n",
Expand Down
1 change: 1 addition & 0 deletions guides/keras_nlp/getting_started.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: An introduction to the KerasNLP API.
Accelerator: GPU
"""

"""
## Introduction
Expand Down
1 change: 1 addition & 0 deletions guides/making_new_layers_and_models_via_subclassing.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Complete guide to writing `Layer` and `Model` objects from scratch.
Accelerator: None
"""

"""
## Introduction
Expand Down
322 changes: 161 additions & 161 deletions guides/md/functional_api.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions guides/sequential_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Complete guide to the Sequential model.
Accelerator: GPU
"""

"""
## Setup
Expand Down
1 change: 1 addition & 0 deletions guides/transfer_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Complete guide to transfer learning & fine-tuning in Keras.
Accelerator: GPU
"""

"""
## Setup
"""
Expand Down
1 change: 1 addition & 0 deletions guides/writing_a_custom_training_loop_in_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Writing low-level training & evaluation loops in JAX.
Accelerator: None
"""

"""
## Setup
"""
Expand Down
1 change: 1 addition & 0 deletions guides/writing_a_custom_training_loop_in_tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Writing low-level training & evaluation loops in TensorFlow.
Accelerator: None
"""

"""
## Setup
"""
Expand Down
1 change: 1 addition & 0 deletions guides/writing_a_custom_training_loop_in_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Writing low-level training & evaluation loops in PyTorch.
Accelerator: None
"""

"""
## Setup
"""
Expand Down
1 change: 1 addition & 0 deletions guides/writing_your_own_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Description: Complete guide to writing new Keras callbacks.
Accelerator: GPU
"""

"""
## Introduction
Expand Down

0 comments on commit 1806537

Please sign in to comment.