Skip to content

Commit ce7f574

Browse files
committed
Version 2.0.0
1 parent 18fac81 commit ce7f574

File tree

1 file changed

+52
-52
lines changed

1 file changed

+52
-52
lines changed

chapter_multilayer-perceptrons/numerical-stability-and-init.ipynb

+52-52
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "6c83e0d8",
5+
"id": "3308044d",
66
"metadata": {
77
"slideshow": {
88
"slide_type": "-"
@@ -17,13 +17,13 @@
1717
{
1818
"cell_type": "code",
1919
"execution_count": 1,
20-
"id": "fea40c56",
20+
"id": "aff1f9fc",
2121
"metadata": {
2222
"execution": {
23-
"iopub.execute_input": "2022-12-07T16:41:04.378212Z",
24-
"iopub.status.busy": "2022-12-07T16:41:04.377556Z",
25-
"iopub.status.idle": "2022-12-07T16:41:06.962905Z",
26-
"shell.execute_reply": "2022-12-07T16:41:06.962005Z"
23+
"iopub.execute_input": "2023-02-06T22:58:23.119357Z",
24+
"iopub.status.busy": "2023-02-06T22:58:23.119081Z",
25+
"iopub.status.idle": "2023-02-06T22:58:28.048577Z",
26+
"shell.execute_reply": "2023-02-06T22:58:28.047818Z"
2727
},
2828
"origin_pos": 2,
2929
"tab": [
@@ -42,7 +42,7 @@
4242
" <rdf:RDF xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n",
4343
" <cc:Work>\n",
4444
" <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n",
45-
" <dc:date>2022-12-07T16:41:06.913306</dc:date>\n",
45+
" <dc:date>2023-02-06T22:58:28.001229</dc:date>\n",
4646
" <dc:format>image/svg+xml</dc:format>\n",
4747
" <dc:creator>\n",
4848
" <cc:Agent>\n",
@@ -78,16 +78,16 @@
7878
" <g id=\"line2d_1\">\n",
7979
" <path d=\"M 48.695149 145.8 \n",
8080
"L 48.695149 7.2 \n",
81-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
81+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
8282
" </g>\n",
8383
" <g id=\"line2d_2\">\n",
8484
" <defs>\n",
85-
" <path id=\"m7cb8acc5bf\" d=\"M 0 0 \n",
85+
" <path id=\"m3a3c662634\" d=\"M 0 0 \n",
8686
"L 0 3.5 \n",
8787
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
8888
" </defs>\n",
8989
" <g>\n",
90-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"48.695149\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
90+
" <use xlink:href=\"#m3a3c662634\" x=\"48.695149\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
9191
" </g>\n",
9292
" </g>\n",
9393
" <g id=\"text_1\">\n",
@@ -155,11 +155,11 @@
155155
" <g id=\"line2d_3\">\n",
156156
" <path d=\"M 84.587088 145.8 \n",
157157
"L 84.587088 7.2 \n",
158-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
158+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
159159
" </g>\n",
160160
" <g id=\"line2d_4\">\n",
161161
" <g>\n",
162-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"84.587088\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
162+
" <use xlink:href=\"#m3a3c662634\" x=\"84.587088\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
163163
" </g>\n",
164164
" </g>\n",
165165
" <g id=\"text_2\">\n",
@@ -199,11 +199,11 @@
199199
" <g id=\"line2d_5\">\n",
200200
" <path d=\"M 120.479027 145.8 \n",
201201
"L 120.479027 7.2 \n",
202-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
202+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
203203
" </g>\n",
204204
" <g id=\"line2d_6\">\n",
205205
" <g>\n",
206-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"120.479027\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
206+
" <use xlink:href=\"#m3a3c662634\" x=\"120.479027\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
207207
" </g>\n",
208208
" </g>\n",
209209
" <g id=\"text_3\">\n",
@@ -246,11 +246,11 @@
246246
" <g id=\"line2d_7\">\n",
247247
" <path d=\"M 156.370967 145.8 \n",
248248
"L 156.370967 7.2 \n",
249-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
249+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
250250
" </g>\n",
251251
" <g id=\"line2d_8\">\n",
252252
" <g>\n",
253-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"156.370967\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
253+
" <use xlink:href=\"#m3a3c662634\" x=\"156.370967\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
254254
" </g>\n",
255255
" </g>\n",
256256
" <g id=\"text_4\">\n",
@@ -266,11 +266,11 @@
266266
" <g id=\"line2d_9\">\n",
267267
" <path d=\"M 192.262906 145.8 \n",
268268
"L 192.262906 7.2 \n",
269-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
269+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
270270
" </g>\n",
271271
" <g id=\"line2d_10\">\n",
272272
" <g>\n",
273-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"192.262906\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
273+
" <use xlink:href=\"#m3a3c662634\" x=\"192.262906\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
274274
" </g>\n",
275275
" </g>\n",
276276
" <g id=\"text_5\">\n",
@@ -286,11 +286,11 @@
286286
" <g id=\"line2d_11\">\n",
287287
" <path d=\"M 228.154845 145.8 \n",
288288
"L 228.154845 7.2 \n",
289-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
289+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
290290
" </g>\n",
291291
" <g id=\"line2d_12\">\n",
292292
" <g>\n",
293-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"228.154845\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
293+
" <use xlink:href=\"#m3a3c662634\" x=\"228.154845\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
294294
" </g>\n",
295295
" </g>\n",
296296
" <g id=\"text_6\">\n",
@@ -306,11 +306,11 @@
306306
" <g id=\"line2d_13\">\n",
307307
" <path d=\"M 264.046784 145.8 \n",
308308
"L 264.046784 7.2 \n",
309-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
309+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
310310
" </g>\n",
311311
" <g id=\"line2d_14\">\n",
312312
" <g>\n",
313-
" <use xlink:href=\"#m7cb8acc5bf\" x=\"264.046784\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
313+
" <use xlink:href=\"#m3a3c662634\" x=\"264.046784\" y=\"145.8\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
314314
" </g>\n",
315315
" </g>\n",
316316
" <g id=\"text_7\">\n",
@@ -328,16 +328,16 @@
328328
" <g id=\"line2d_15\">\n",
329329
" <path d=\"M 30.103125 139.54227 \n",
330330
"L 281.203125 139.54227 \n",
331-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
331+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
332332
" </g>\n",
333333
" <g id=\"line2d_16\">\n",
334334
" <defs>\n",
335-
" <path id=\"mecba6768bb\" d=\"M 0 0 \n",
335+
" <path id=\"m9cbd365d89\" d=\"M 0 0 \n",
336336
"L -3.5 0 \n",
337337
"\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
338338
" </defs>\n",
339339
" <g>\n",
340-
" <use xlink:href=\"#mecba6768bb\" x=\"30.103125\" y=\"139.54227\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
340+
" <use xlink:href=\"#m9cbd365d89\" x=\"30.103125\" y=\"139.54227\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
341341
" </g>\n",
342342
" </g>\n",
343343
" <g id=\"text_8\">\n",
@@ -353,11 +353,11 @@
353353
" <g id=\"line2d_17\">\n",
354354
" <path d=\"M 30.103125 114.32447 \n",
355355
"L 281.203125 114.32447 \n",
356-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
356+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
357357
" </g>\n",
358358
" <g id=\"line2d_18\">\n",
359359
" <g>\n",
360-
" <use xlink:href=\"#mecba6768bb\" x=\"30.103125\" y=\"114.32447\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
360+
" <use xlink:href=\"#m9cbd365d89\" x=\"30.103125\" y=\"114.32447\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
361361
" </g>\n",
362362
" </g>\n",
363363
" <g id=\"text_9\">\n",
@@ -373,11 +373,11 @@
373373
" <g id=\"line2d_19\">\n",
374374
" <path d=\"M 30.103125 89.106669 \n",
375375
"L 281.203125 89.106669 \n",
376-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
376+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
377377
" </g>\n",
378378
" <g id=\"line2d_20\">\n",
379379
" <g>\n",
380-
" <use xlink:href=\"#mecba6768bb\" x=\"30.103125\" y=\"89.106669\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
380+
" <use xlink:href=\"#m9cbd365d89\" x=\"30.103125\" y=\"89.106669\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
381381
" </g>\n",
382382
" </g>\n",
383383
" <g id=\"text_10\">\n",
@@ -414,11 +414,11 @@
414414
" <g id=\"line2d_21\">\n",
415415
" <path d=\"M 30.103125 63.888869 \n",
416416
"L 281.203125 63.888869 \n",
417-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
417+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
418418
" </g>\n",
419419
" <g id=\"line2d_22\">\n",
420420
" <g>\n",
421-
" <use xlink:href=\"#mecba6768bb\" x=\"30.103125\" y=\"63.888869\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
421+
" <use xlink:href=\"#m9cbd365d89\" x=\"30.103125\" y=\"63.888869\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
422422
" </g>\n",
423423
" </g>\n",
424424
" <g id=\"text_11\">\n",
@@ -466,11 +466,11 @@
466466
" <g id=\"line2d_23\">\n",
467467
" <path d=\"M 30.103125 38.671069 \n",
468468
"L 281.203125 38.671069 \n",
469-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
469+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
470470
" </g>\n",
471471
" <g id=\"line2d_24\">\n",
472472
" <g>\n",
473-
" <use xlink:href=\"#mecba6768bb\" x=\"30.103125\" y=\"38.671069\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
473+
" <use xlink:href=\"#m9cbd365d89\" x=\"30.103125\" y=\"38.671069\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
474474
" </g>\n",
475475
" </g>\n",
476476
" <g id=\"text_12\">\n",
@@ -527,11 +527,11 @@
527527
" <g id=\"line2d_25\">\n",
528528
" <path d=\"M 30.103125 13.453269 \n",
529529
"L 281.203125 13.453269 \n",
530-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
530+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square\"/>\n",
531531
" </g>\n",
532532
" <g id=\"line2d_26\">\n",
533533
" <g>\n",
534-
" <use xlink:href=\"#mecba6768bb\" x=\"30.103125\" y=\"13.453269\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
534+
" <use xlink:href=\"#m9cbd365d89\" x=\"30.103125\" y=\"13.453269\" style=\"stroke: #000000; stroke-width: 0.8\"/>\n",
535535
" </g>\n",
536536
" </g>\n",
537537
" <g id=\"text_13\">\n",
@@ -608,7 +608,7 @@
608608
"L 256.868396 13.568135 \n",
609609
"L 269.789489 13.5 \n",
610610
"L 269.789489 13.5 \n",
611-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
611+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke: #1f77b4; stroke-width: 1.5; stroke-linecap: square\"/>\n",
612612
" </g>\n",
613613
" <g id=\"line2d_28\">\n",
614614
" <path d=\"M 41.516761 139.5 \n",
@@ -659,7 +659,7 @@
659659
"L 251.125684 139.371202 \n",
660660
"L 269.789489 139.495556 \n",
661661
"L 269.789489 139.495556 \n",
662-
"\" clip-path=\"url(#p97e03a7b71)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n",
662+
"\" clip-path=\"url(#p3ccb380885)\" style=\"fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #bf00bf; stroke-width: 1.5\"/>\n",
663663
" </g>\n",
664664
" <g id=\"patch_3\">\n",
665665
" <path d=\"M 30.103125 145.8 \n",
@@ -1010,7 +1010,7 @@
10101010
" </g>\n",
10111011
" </g>\n",
10121012
" <defs>\n",
1013-
" <clipPath id=\"p97e03a7b71\">\n",
1013+
" <clipPath id=\"p3ccb380885\">\n",
10141014
" <rect x=\"30.103125\" y=\"7.2\" width=\"251.1\" height=\"138.6\"/>\n",
10151015
" </clipPath>\n",
10161016
" </defs>\n",
@@ -1039,7 +1039,7 @@
10391039
},
10401040
{
10411041
"cell_type": "markdown",
1042-
"id": "8fc0801c",
1042+
"id": "c5fc1fa8",
10431043
"metadata": {
10441044
"slideshow": {
10451045
"slide_type": "slide"
@@ -1052,13 +1052,13 @@
10521052
{
10531053
"cell_type": "code",
10541054
"execution_count": 2,
1055-
"id": "1c21a4b2",
1055+
"id": "cc678796",
10561056
"metadata": {
10571057
"execution": {
1058-
"iopub.execute_input": "2022-12-07T16:41:06.971113Z",
1059-
"iopub.status.busy": "2022-12-07T16:41:06.970426Z",
1060-
"iopub.status.idle": "2022-12-07T16:41:06.979191Z",
1061-
"shell.execute_reply": "2022-12-07T16:41:06.978404Z"
1058+
"iopub.execute_input": "2023-02-06T22:58:28.052789Z",
1059+
"iopub.status.busy": "2023-02-06T22:58:28.052451Z",
1060+
"iopub.status.idle": "2023-02-06T22:58:28.075839Z",
1061+
"shell.execute_reply": "2023-02-06T22:58:28.075097Z"
10621062
},
10631063
"origin_pos": 7,
10641064
"tab": [
@@ -1071,15 +1071,15 @@
10711071
"output_type": "stream",
10721072
"text": [
10731073
"一个矩阵 \n",
1074-
" tensor([[-0.4430, 1.8467, 1.2274, 0.2537],\n",
1075-
" [ 1.6749, -1.5996, 0.6402, 0.1141],\n",
1076-
" [-0.1859, -0.4506, 2.5819, -1.3329],\n",
1077-
" [ 2.7346, 0.1642, -0.6078, -0.0507]])\n",
1074+
" tensor([[ 1.1677, 0.3804, -0.7343, -1.8798],\n",
1075+
" [ 0.5325, -2.4282, 0.2886, 0.0961],\n",
1076+
" [-0.6474, -1.2622, -0.0183, -0.0958],\n",
1077+
" [-0.9811, 0.9840, -1.4430, 0.1905]])\n",
10781078
"乘以100个矩阵后\n",
1079-
" tensor([[ 6.9875e+23, 5.5570e+23, 7.6843e+23, -1.9781e+23],\n",
1080-
" [-6.3054e+23, -5.0146e+23, -6.9342e+23, 1.7850e+23],\n",
1081-
" [ 6.4354e+23, 5.1180e+23, 7.0772e+23, -1.8218e+23],\n",
1082-
" [-1.1732e+24, -9.3301e+23, -1.2902e+24, 3.3212e+23]])\n"
1079+
" tensor([[-2.0338e+22, -1.2461e+21, 1.6642e+22, 1.4078e+21],\n",
1080+
" [ 1.4095e+22, 8.6345e+20, -1.1534e+22, -9.7620e+20],\n",
1081+
" [ 3.1960e+22, 1.9580e+21, -2.6153e+22, -2.2129e+21],\n",
1082+
" [ 9.7268e+21, 5.9587e+20, -7.9593e+21, -6.7356e+20]])\n"
10831083
]
10841084
}
10851085
],

0 commit comments

Comments
 (0)