Skip to content

Commit faea02e

Browse files
committed
Update notebooks
1 parent ef481bd commit faea02e

17 files changed

+323
-95
lines changed

chapter02_mathematical-building-blocks.ipynb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"colab_type": "text"
77
},
88
"source": [
9-
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](TODO). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**"
9+
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](https://www.manning.com/books/deep-learning-with-python-third-edition). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**\n\nThe book's contents are available online at [deeplearningwithpython.io](https://deeplearningwithpython.io)."
1010
]
1111
},
1212
{
@@ -32,6 +32,15 @@
3232
"os.environ[\"KERAS_BACKEND\"] = \"jax\""
3333
]
3434
},
35+
{
36+
"cell_type": "markdown",
37+
"metadata": {
38+
"colab_type": "text"
39+
},
40+
"source": [
41+
"## The mathematical building blocks of neural networks"
42+
]
43+
},
3544
{
3645
"cell_type": "markdown",
3746
"metadata": {
@@ -958,7 +967,7 @@
958967
"colab_type": "text"
959968
},
960969
"source": [
961-
"### The engine of neural networks: gradient-based optimization"
970+
"### The engine of neural networks: Gradient-based optimization"
962971
]
963972
},
964973
{
@@ -994,7 +1003,7 @@
9941003
"colab_type": "text"
9951004
},
9961005
"source": [
997-
"#### Chaining derivatives: the Backpropagation algorithm"
1006+
"#### Chaining derivatives: The Backpropagation algorithm"
9981007
]
9991008
},
10001009
{
@@ -1402,7 +1411,7 @@
14021411
"colab_type": "text"
14031412
},
14041413
"source": [
1405-
"### Chapter summary"
1414+
"### Summary"
14061415
]
14071416
}
14081417
],

chapter03_introduction-to-ml-frameworks.ipynb

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"colab_type": "text"
77
},
88
"source": [
9-
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](TODO). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**"
9+
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](https://www.manning.com/books/deep-learning-with-python-third-edition). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**\n\nThe book's contents are available online at [deeplearningwithpython.io](https://deeplearningwithpython.io)."
1010
]
1111
},
1212
{
@@ -32,6 +32,15 @@
3232
"os.environ[\"KERAS_BACKEND\"] = \"jax\""
3333
]
3434
},
35+
{
36+
"cell_type": "markdown",
37+
"metadata": {
38+
"colab_type": "text"
39+
},
40+
"source": [
41+
"## Introduction to TensorFlow, PyTorch, JAX, and Keras"
42+
]
43+
},
3544
{
3645
"cell_type": "markdown",
3746
"metadata": {
@@ -74,7 +83,7 @@
7483
"colab_type": "text"
7584
},
7685
"source": [
77-
"##### Tensors and Variables in TensorFlow"
86+
"##### Tensors and variables in TensorFlow"
7887
]
7988
},
8089
{
@@ -159,7 +168,7 @@
159168
"colab_type": "text"
160169
},
161170
"source": [
162-
"###### Tensor assignment and the `Variable` class"
171+
"###### Tensor assignment and the Variable class"
163172
]
164173
},
165174
{
@@ -227,7 +236,7 @@
227236
"colab_type": "text"
228237
},
229238
"source": [
230-
"##### Tensor operations: doing math in TensorFlow"
239+
"##### Tensor operations: Doing math in TensorFlow"
231240
]
232241
},
233242
{
@@ -264,7 +273,7 @@
264273
"colab_type": "text"
265274
},
266275
"source": [
267-
"##### Gradients in TensorFlow: a second look at the `GradientTape` API"
276+
"##### Gradients in TensorFlow: A second look at the GradientTape API"
268277
]
269278
},
270279
{
@@ -353,7 +362,7 @@
353362
"colab_type": "text"
354363
},
355364
"source": [
356-
"#### An end-to-end example: a linear classifier in pure TensorFlow"
365+
"#### An end-to-end example: A linear classifier in pure TensorFlow"
357366
]
358367
},
359368
{
@@ -549,7 +558,7 @@
549558
"colab_type": "text"
550559
},
551560
"source": [
552-
"##### Tensors and Parameters in PyTorch"
561+
"##### Tensors and parameters in PyTorch"
553562
]
554563
},
555564
{
@@ -668,7 +677,7 @@
668677
"colab_type": "text"
669678
},
670679
"source": [
671-
"##### Tensor operations: doing math in PyTorch"
680+
"##### Tensor operations: Doing math in PyTorch"
672681
]
673682
},
674683
{
@@ -753,7 +762,7 @@
753762
"colab_type": "text"
754763
},
755764
"source": [
756-
"#### An end-to-end example: a linear classifier in pure PyTorch"
765+
"#### An end-to-end example: A linear classifier in pure PyTorch"
757766
]
758767
},
759768
{
@@ -825,7 +834,7 @@
825834
"colab_type": "text"
826835
},
827836
"source": [
828-
"##### Packaging state and computation with the `Module` class"
837+
"##### Packaging state and computation with the Module class"
829838
]
830839
},
831840
{
@@ -1149,7 +1158,7 @@
11491158
"colab_type": "text"
11501159
},
11511160
"source": [
1152-
"##### Tensor operations: doing math in JAX"
1161+
"##### Tensor operations: Doing math in JAX"
11531162
]
11541163
},
11551164
{
@@ -1278,7 +1287,7 @@
12781287
"colab_type": "text"
12791288
},
12801289
"source": [
1281-
"##### Making JAX functions fast with `@jax.jit`"
1290+
"##### Making JAX functions fast with @jax.jit"
12821291
]
12831292
},
12841293
{
@@ -1300,7 +1309,7 @@
13001309
"colab_type": "text"
13011310
},
13021311
"source": [
1303-
"#### An end-to-end example: a linear classifier in pure JAX"
1312+
"#### An end-to-end example: A linear classifier in pure JAX"
13041313
]
13051314
},
13061315
{
@@ -1440,7 +1449,7 @@
14401449
"colab_type": "text"
14411450
},
14421451
"source": [
1443-
"#### Layers: the building blocks of deep learning"
1452+
"#### Layers: The building blocks of deep learning"
14441453
]
14451454
},
14461455
{
@@ -1502,7 +1511,7 @@
15021511
"colab_type": "text"
15031512
},
15041513
"source": [
1505-
"##### Automatic shape inference: building layers on the fly"
1514+
"##### Automatic shape inference: Building layers on the fly"
15061515
]
15071516
},
15081517
{
@@ -1570,7 +1579,7 @@
15701579
"colab_type": "text"
15711580
},
15721581
"source": [
1573-
"#### The \"compile\" step: configuring the learning process"
1582+
"#### The \"compile\" step: Configuring the learning process"
15741583
]
15751584
},
15761585
{
@@ -1619,7 +1628,7 @@
16191628
"colab_type": "text"
16201629
},
16211630
"source": [
1622-
"#### Understanding the `fit` method"
1631+
"#### Understanding the fit method"
16231632
]
16241633
},
16251634
{
@@ -1655,7 +1664,7 @@
16551664
"colab_type": "text"
16561665
},
16571666
"source": [
1658-
"#### Monitoring loss & metrics on validation data"
1667+
"#### Monitoring loss and metrics on validation data"
16591668
]
16601669
},
16611670
{
@@ -1697,7 +1706,7 @@
16971706
"colab_type": "text"
16981707
},
16991708
"source": [
1700-
"#### Inference: using a model after training"
1709+
"#### Inference: Using a model after training"
17011710
]
17021711
},
17031712
{
@@ -1718,7 +1727,7 @@
17181727
"colab_type": "text"
17191728
},
17201729
"source": [
1721-
"### Chapter summary"
1730+
"### Summary"
17221731
]
17231732
}
17241733
],

chapter04_classification-and-regression.ipynb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"colab_type": "text"
77
},
88
"source": [
9-
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](TODO). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**"
9+
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](https://www.manning.com/books/deep-learning-with-python-third-edition). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**\n\nThe book's contents are available online at [deeplearningwithpython.io](https://deeplearningwithpython.io)."
1010
]
1111
},
1212
{
@@ -38,7 +38,16 @@
3838
"colab_type": "text"
3939
},
4040
"source": [
41-
"### Classifying movie reviews: a binary classification example"
41+
"## Classification and regression"
42+
]
43+
},
44+
{
45+
"cell_type": "markdown",
46+
"metadata": {
47+
"colab_type": "text"
48+
},
49+
"source": [
50+
"### Classifying movie reviews: A binary classification example"
4251
]
4352
},
4453
{
@@ -413,7 +422,7 @@
413422
"colab_type": "text"
414423
},
415424
"source": [
416-
"### Classifying newswires: a multiclass classification example"
425+
"### Classifying newswires: A multiclass classification example"
417426
]
418427
},
419428
{
@@ -1244,7 +1253,7 @@
12441253
"colab_type": "text"
12451254
},
12461255
"source": [
1247-
"### Chapter summary"
1256+
"### Summary"
12481257
]
12491258
}
12501259
],

chapter05_fundamentals-of-ml.ipynb

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"colab_type": "text"
77
},
88
"source": [
9-
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](TODO). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**"
9+
"This is a companion notebook for the book [Deep Learning with Python, Third Edition](https://www.manning.com/books/deep-learning-with-python-third-edition). For readability, it only contains runnable code blocks and section titles, and omits everything else in the book: text paragraphs, figures, and pseudocode.\n\n**If you want to be able to follow what's going on, I recommend reading the notebook side by side with your copy of the book.**\n\nThe book's contents are available online at [deeplearningwithpython.io](https://deeplearningwithpython.io)."
1010
]
1111
},
1212
{
@@ -38,7 +38,16 @@
3838
"colab_type": "text"
3939
},
4040
"source": [
41-
"### Generalization: the goal of machine learning"
41+
"## Fundamentals of machine learning"
42+
]
43+
},
44+
{
45+
"cell_type": "markdown",
46+
"metadata": {
47+
"colab_type": "text"
48+
},
49+
"source": [
50+
"### Generalization: The goal of machine learning"
4251
]
4352
},
4453
{
@@ -397,7 +406,7 @@
397406
"colab_type": "text"
398407
},
399408
"source": [
400-
"#### Leveraging better architecture priors"
409+
"#### Using better architecture priors"
401410
]
402411
},
403412
{
@@ -894,7 +903,7 @@
894903
"outputs": [],
895904
"source": [
896905
"original_val_loss = history_original.history[\"val_loss\"]\n",
897-
"l2_val_loss = history_l2_reg.history[\"val_loss\"]\n",
906+
"dropout_val_loss = history_dropout.history[\"val_loss\"]\n",
898907
"epochs = range(1, 21)\n",
899908
"plt.plot(\n",
900909
" epochs,\n",
@@ -904,7 +913,7 @@
904913
")\n",
905914
"plt.plot(\n",
906915
" epochs,\n",
907-
" l2_val_loss,\n",
916+
" dropout_val_loss,\n",
908917
" \"b-\",\n",
909918
" label=\"Validation loss of dropout-regularized model\",\n",
910919
")\n",
@@ -924,7 +933,7 @@
924933
"colab_type": "text"
925934
},
926935
"source": [
927-
"### Chapter summary"
936+
"### Summary"
928937
]
929938
}
930939
],

0 commit comments

Comments
 (0)