Skip to content

Commit

Permalink
Update all notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
fchollet committed Sep 13, 2021
1 parent a39702b commit 60e4956
Show file tree
Hide file tree
Showing 20 changed files with 275 additions and 241 deletions.
10 changes: 5 additions & 5 deletions chapter02_mathematical-building-blocks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@
"colab_type": "text"
},
"source": [
"### Rank-3 tensors and higher-rank tensors"
"### Rank-3 and higher-rank tensors"
]
},
{
Expand Down Expand Up @@ -1028,7 +1028,7 @@
"colab_type": "text"
},
"source": [
"### Chaining derivatives: the Backpropagation algorithm"
"### Chaining derivatives: The Backpropagation algorithm"
]
},
{
Expand All @@ -1055,7 +1055,7 @@
"colab_type": "text"
},
"source": [
"#### The Gradient Tape in TensorFlow"
"#### The gradient tape in TensorFlow"
]
},
{
Expand Down Expand Up @@ -1337,7 +1337,7 @@
"learning_rate = 1e-3\n",
"\n",
"def update_weights(gradients, weights):\n",
" for g, w in zip(gradients, model.weights):\n",
" for g, w in zip(gradients, weights):\n",
" w.assign_sub(g * learning_rate)"
]
},
Expand Down Expand Up @@ -1434,7 +1434,7 @@
"colab_type": "text"
},
"source": [
"## Chapter summary"
"## Summary"
]
}
],
Expand Down
65 changes: 39 additions & 26 deletions chapter03_introduction-to-keras-and-tf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"colab_type": "text"
},
"source": [
"## Keras and TensorFlow: a brief history"
"## Keras and TensorFlow: A brief history"
]
},
{
Expand All @@ -60,7 +60,7 @@
"colab_type": "text"
},
"source": [
"### Jupyter notebooks: the preferred way to run deep-learning experiments"
"### Jupyter notebooks: The preferred way to run deep-learning experiments"
]
},
{
Expand All @@ -87,7 +87,7 @@
"colab_type": "text"
},
"source": [
"#### Installing packages with `pip`"
"#### Installing packages with pip"
]
},
{
Expand All @@ -114,7 +114,7 @@
"colab_type": "text"
},
"source": [
"#### Constant tensors and Variables"
"#### Constant tensors and variables"
]
},
{
Expand Down Expand Up @@ -212,7 +212,7 @@
"colab_type": "text"
},
"source": [
"**Creating a Variable**"
"**Creating a TensorFlow variable**"
]
},
{
Expand All @@ -233,7 +233,7 @@
"colab_type": "text"
},
"source": [
"**Assigning a value to a Variable**"
"**Assigning a value to a TensorFlow variable**"
]
},
{
Expand All @@ -253,7 +253,7 @@
"colab_type": "text"
},
"source": [
"**Assigning a value to a subset of a Variable**"
"**Assigning a value to a subset of a TensorFlow variable**"
]
},
{
Expand All @@ -273,7 +273,7 @@
"colab_type": "text"
},
"source": [
"**Using assign_add**"
"**Using `assign_add`**"
]
},
{
Expand All @@ -293,7 +293,7 @@
"colab_type": "text"
},
"source": [
"#### Tensor operations: doing math in TensorFlow"
"#### Tensor operations: Doing math in TensorFlow"
]
},
{
Expand Down Expand Up @@ -327,7 +327,7 @@
"colab_type": "text"
},
"source": [
"#### A second look at the `GradientTape` API"
"#### A second look at the GradientTape API"
]
},
{
Expand All @@ -336,7 +336,7 @@
"colab_type": "text"
},
"source": [
"**Using the GradientTape**"
"**Using the `GradientTape`**"
]
},
{
Expand All @@ -359,7 +359,7 @@
"colab_type": "text"
},
"source": [
"**Using the GradientTape with constant tensor inputs**"
"**Using `GradientTape` with constant tensor inputs**"
]
},
{
Expand Down Expand Up @@ -408,7 +408,7 @@
"colab_type": "text"
},
"source": [
"#### An end-to-end example: a linear classifier in pure TensorFlow"
"#### An end-to-end example: A linear classifier in pure TensorFlow"
]
},
{
Expand All @@ -430,9 +430,13 @@
"source": [
"num_samples_per_class = 1000\n",
"negative_samples = np.random.multivariate_normal(\n",
" mean=[0, 3], cov=[[1, 0.5],[0.5, 1]], size=num_samples_per_class)\n",
" mean=[0, 3],\n",
" cov=[[1, 0.5],[0.5, 1]],\n",
" size=num_samples_per_class)\n",
"positive_samples = np.random.multivariate_normal(\n",
" mean=[3, 0], cov=[[1, 0.5],[0.5, 1]], size=num_samples_per_class)"
" mean=[3, 0],\n",
" cov=[[1, 0.5],[0.5, 1]],\n",
" size=num_samples_per_class)"
]
},
{
Expand Down Expand Up @@ -648,7 +652,7 @@
"colab_type": "text"
},
"source": [
"## Anatomy of a neural network: understanding core Keras APIs"
"## Anatomy of a neural network: Understanding core Keras APIs"
]
},
{
Expand All @@ -657,7 +661,7 @@
"colab_type": "text"
},
"source": [
"### Layers: the building blocks of deep learning"
"### Layers: The building blocks of deep learning"
]
},
{
Expand All @@ -666,7 +670,16 @@
"colab_type": "text"
},
"source": [
"#### The base `Layer` class in Keras"
"#### The base Layer class in Keras"
]
},
{
"cell_type": "markdown",
"metadata": {
"colab_type": "text"
},
"source": [
"**A `Dense` layer implemented as a `Layer` subclass**"
]
},
{
Expand Down Expand Up @@ -720,7 +733,7 @@
"colab_type": "text"
},
"source": [
"#### Automatic shape inference: building layers on the fly"
"#### Automatic shape inference: Building layers on the fly"
]
},
{
Expand Down Expand Up @@ -782,7 +795,7 @@
"colab_type": "text"
},
"source": [
"### The \"compile\" step: configuring the learning process"
"### The \"compile\" step: Configuring the learning process"
]
},
{
Expand Down Expand Up @@ -827,7 +840,7 @@
"colab_type": "text"
},
"source": [
"### Understanding the `fit` method"
"### Understanding the fit() method"
]
},
{
Expand All @@ -836,7 +849,7 @@
"colab_type": "text"
},
"source": [
"**Calling `fit` with NumPy data**"
"**Calling `fit()` with NumPy data**"
]
},
{
Expand Down Expand Up @@ -872,7 +885,7 @@
"colab_type": "text"
},
"source": [
"### Monitoring loss & metrics on validation data"
"### Monitoring loss and metrics on validation data"
]
},
{
Expand All @@ -881,7 +894,7 @@
"colab_type": "text"
},
"source": [
"**Using the validation data argument**"
"**Using the `validation_data` argument**"
]
},
{
Expand Down Expand Up @@ -921,7 +934,7 @@
"colab_type": "text"
},
"source": [
"### Inference: using a model after training"
"### Inference: Using a model after training"
]
},
{
Expand All @@ -942,7 +955,7 @@
"colab_type": "text"
},
"source": [
"## Chapter summary"
"## Summary"
]
}
],
Expand Down
10 changes: 5 additions & 5 deletions chapter04_getting-started-with-neural-networks.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"colab_type": "text"
},
"source": [
"# Getting started with neural networks: classification and regression"
"# Getting started with neural networks: Classification and regression"
]
},
{
Expand All @@ -24,7 +24,7 @@
"colab_type": "text"
},
"source": [
"## Classifying movie reviews: a binary classification example"
"## Classifying movie reviews: A binary classification example"
]
},
{
Expand Down Expand Up @@ -445,7 +445,7 @@
"colab_type": "text"
},
"source": [
"## Classifying newswires: a multiclass classification example"
"## Classifying newswires: A multiclass classification example"
]
},
{
Expand Down Expand Up @@ -994,7 +994,7 @@
"colab_type": "text"
},
"source": [
"## Predicting house prices: a regression example"
"## Predicting house prices: A regression example"
]
},
{
Expand Down Expand Up @@ -1378,7 +1378,7 @@
"colab_type": "text"
},
"source": [
"## Chapter summary"
"## Summary"
]
}
],
Expand Down
8 changes: 4 additions & 4 deletions chapter05_fundamentals-of-ml.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"colab_type": "text"
},
"source": [
"## Generalization: the goal of machine learning"
"## Generalization: The goal of machine learning"
]
},
{
Expand Down Expand Up @@ -699,9 +699,9 @@
},
"outputs": [],
"source": [
"from\u00a0keras\u00a0import\u00a0regularizers\n",
"from tensorflow.keras import regularizers\n",
"regularizers.l1(0.001)\n",
"regularizers.l1_l2(l1=0.001,\u00a0l2=0.001)"
"regularizers.l1_l2(l1=0.001, l2=0.001)"
]
},
{
Expand Down Expand Up @@ -751,7 +751,7 @@
"colab_type": "text"
},
"source": [
"## Chapter summary"
"## Summary"
]
}
],
Expand Down
Loading

0 comments on commit 60e4956

Please sign in to comment.