update
This commit is contained in:
@@ -343,6 +343,16 @@ const thebe_selector_output = ".output, .cell_output"
|
||||
Week 43: Deep Learning: Constructing a Neural Network code and solving differential equations
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="week44.html">
|
||||
Week 44, Convolutional Neural Networks (CNN)
|
||||
</a>
|
||||
</li>
|
||||
<li class="toctree-l1">
|
||||
<a class="reference internal" href="week45.html">
|
||||
Week 45, Recurrent Neural Networks
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<p aria-level="2" class="caption" role="heading">
|
||||
<span class="caption-text">
|
||||
@@ -814,15 +824,15 @@ regression.</p>
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
|
||||
[[3.97739698]
|
||||
[2.9189726 ]]
|
||||
Eigenvalues of Hessian Matrix:[0.27987128 4.51549827]
|
||||
[[3.69887085]
|
||||
[3.34977681]]
|
||||
Eigenvalues of Hessian Matrix:[0.25923926 4.67193435]
|
||||
theta from own gd
|
||||
[[3.97739698]
|
||||
[2.9189726 ]]
|
||||
[[3.69887085]
|
||||
[3.34977681]]
|
||||
theta from own sdg
|
||||
[[3.9577228 ]
|
||||
[2.91473433]]
|
||||
[[3.63685221]
|
||||
[3.37369014]]
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/exercisesweek41_5_1.png" src="_images/exercisesweek41_5_1.png" />
|
||||
@@ -944,14 +954,14 @@ first example shows results with ordinary leats squares.</p>
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
|
||||
[[4.32133765]
|
||||
[2.59905073]]
|
||||
Eigenvalues of Hessian Matrix:[0.29426584 4.28858038]
|
||||
[[3.64342603]
|
||||
[3.30485583]]
|
||||
Eigenvalues of Hessian Matrix:[0.29030069 4.6608358 ]
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own gd
|
||||
[[4.32133765]
|
||||
[2.59905073]]
|
||||
[[3.64342603]
|
||||
[3.30485583]]
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/exercisesweek41_16_2.png" src="_images/exercisesweek41_16_2.png" />
|
||||
@@ -1022,73 +1032,73 @@ Eigenvalues of Hessian Matrix:[0.29426584 4.28858038]
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
|
||||
[[4.]
|
||||
[3.]]
|
||||
Eigenvalues of Hessian Matrix:[0.30311767 4.03556032]
|
||||
0 [-14.28624958] [-15.54071847]
|
||||
1 [-0.04900086] [0.04473913]
|
||||
2 [-0.04532032] [0.0413787]
|
||||
3 [-0.04191624] [0.03827068]
|
||||
4 [-0.03876784] [0.0353961]
|
||||
5 [-0.03585592] [0.03273744]
|
||||
6 [-0.03316272] [0.03027848]
|
||||
7 [-0.03067182] [0.02800421]
|
||||
8 [-0.02836801] [0.02590077]
|
||||
9 [-0.02623724] [0.02395532]
|
||||
10 [-0.02426651] [0.022156]
|
||||
11 [-0.02244382] [0.02049182]
|
||||
12 [-0.02075802] [0.01895265]
|
||||
13 [-0.01919885] [0.01752908]
|
||||
14 [-0.0177568] [0.01621244]
|
||||
15 [-0.01642305] [0.0149947]
|
||||
16 [-0.01518949] [0.01386842]
|
||||
17 [-0.01404858] [0.01282674]
|
||||
18 [-0.01299337] [0.0118633]
|
||||
19 [-0.01201742] [0.01097223]
|
||||
20 [-0.01111477] [0.01014809]
|
||||
21 [-0.01027992] [0.00938585]
|
||||
22 [-0.00950778] [0.00868086]
|
||||
23 [-0.00879363] [0.00802883]
|
||||
24 [-0.00813313] [0.00742577]
|
||||
25 [-0.00752224] [0.00686801]
|
||||
26 [-0.00695723] [0.00635214]
|
||||
27 [-0.00643466] [0.00587502]
|
||||
28 [-0.00595134] [0.00543374]
|
||||
29 [-0.00550433] [0.0050256]
|
||||
Eigenvalues of Hessian Matrix:[0.27335131 4.46000649]
|
||||
0 [-13.27099835] [-15.86570776]
|
||||
1 [0.01163425] [-0.00974702]
|
||||
2 [0.01092119] [-0.00914964]
|
||||
3 [0.01025184] [-0.00858886]
|
||||
4 [0.00962351] [-0.00806245]
|
||||
5 [0.00903369] [-0.00756831]
|
||||
6 [0.00848002] [-0.00710445]
|
||||
7 [0.00796028] [-0.00666902]
|
||||
8 [0.0074724] [-0.00626028]
|
||||
9 [0.00701442] [-0.00587659]
|
||||
10 [0.00658451] [-0.00551642]
|
||||
11 [0.00618095] [-0.00517832]
|
||||
12 [0.00580212] [-0.00486095]
|
||||
13 [0.00544651] [-0.00456302]
|
||||
14 [0.0051127] [-0.00428336]
|
||||
15 [0.00479935] [-0.00402083]
|
||||
16 [0.0045052] [-0.0037744]
|
||||
17 [0.00422908] [-0.00354307]
|
||||
18 [0.00396988] [-0.00332591]
|
||||
19 [0.00372657] [-0.00312207]
|
||||
20 [0.00349817] [-0.00293072]
|
||||
21 [0.00328377] [-0.0027511]
|
||||
22 [0.00308251] [-0.00258249]
|
||||
23 [0.00289358] [-0.00242421]
|
||||
24 [0.00271624] [-0.00227563]
|
||||
25 [0.00254976] [-0.00213616]
|
||||
26 [0.00239349] [-0.00200523]
|
||||
27 [0.00224679] [-0.00188233]
|
||||
28 [0.00210909] [-0.00176697]
|
||||
29 [0.00197982] [-0.00165867]
|
||||
theta from own gd
|
||||
[[3.98320492]
|
||||
[3.01533437]]
|
||||
0 [-0.00509089] [0.00464812]
|
||||
1 [-0.0047085] [0.00429899]
|
||||
2 [-0.00424012] [0.00387135]
|
||||
3 [-0.00378113] [0.00345227]
|
||||
4 [-0.00335942] [0.00306724]
|
||||
5 [-0.00298058] [0.00272135]
|
||||
6 [-0.00264305] [0.00241318]
|
||||
7 [-0.00234327] [0.00213947]
|
||||
8 [-0.00207732] [0.00189665]
|
||||
9 [-0.00184151] [0.00168135]
|
||||
10 [-0.00163245] [0.00149047]
|
||||
11 [-0.00144711] [0.00132125]
|
||||
12 [-0.00128282] [0.00117125]
|
||||
13 [-0.00113717] [0.00103827]
|
||||
14 [-0.00100807] [0.00092039]
|
||||
15 [-0.00089362] [0.0008159]
|
||||
16 [-0.00079216] [0.00072326]
|
||||
17 [-0.00070222] [0.00064115]
|
||||
18 [-0.0006225] [0.00056836]
|
||||
19 [-0.00055182] [0.00050383]
|
||||
20 [-0.00048917] [0.00044663]
|
||||
21 [-0.00043363] [0.00039592]
|
||||
22 [-0.0003844] [0.00035097]
|
||||
23 [-0.00034076] [0.00031112]
|
||||
24 [-0.00030207] [0.0002758]
|
||||
25 [-0.00026778] [0.00024449]
|
||||
26 [-0.00023737] [0.00021673]
|
||||
27 [-0.00021042] [0.00019212]
|
||||
28 [-0.00018653] [0.00017031]
|
||||
29 [-0.00016536] [0.00015097]
|
||||
[[4.00679887]
|
||||
[2.994304 ]]
|
||||
0 [0.00185848] [-0.00155701]
|
||||
1 [0.00174457] [-0.00146158]
|
||||
2 [0.00160348] [-0.00134337]
|
||||
3 [0.00146287] [-0.00122558]
|
||||
4 [0.00133103] [-0.00111512]
|
||||
5 [0.0012099] [-0.00101364]
|
||||
6 [0.00109941] [-0.00092107]
|
||||
7 [0.00099888] [-0.00083685]
|
||||
8 [0.0009075] [-0.00076029]
|
||||
9 [0.00082447] [-0.00069073]
|
||||
10 [0.00074902] [-0.00062752]
|
||||
11 [0.00068048] [-0.0005701]
|
||||
12 [0.00061822] [-0.00051793]
|
||||
13 [0.00056165] [-0.00047054]
|
||||
14 [0.00051025] [-0.00042748]
|
||||
15 [0.00046356] [-0.00038836]
|
||||
16 [0.00042114] [-0.00035283]
|
||||
17 [0.0003826] [-0.00032054]
|
||||
18 [0.00034759] [-0.00029121]
|
||||
19 [0.00031579] [-0.00026456]
|
||||
20 [0.00028689] [-0.00024035]
|
||||
21 [0.00026064] [-0.00021836]
|
||||
22 [0.00023679] [-0.00019838]
|
||||
23 [0.00021512] [-0.00018022]
|
||||
24 [0.00019544] [-0.00016373]
|
||||
25 [0.00017755] [-0.00014875]
|
||||
26 [0.0001613] [-0.00013514]
|
||||
27 [0.00014654] [-0.00012277]
|
||||
28 [0.00013313] [-0.00011154]
|
||||
29 [0.00012095] [-0.00010133]
|
||||
theta from own gd wth momentum
|
||||
[[3.99951642]
|
||||
[3.00044152]]
|
||||
[[4.00040199]
|
||||
[2.99966322]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1141,17 +1151,17 @@ theta from own gd wth momentum
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
|
||||
[[3.66959644]
|
||||
[3.26513904]]
|
||||
Eigenvalues of Hessian Matrix:[0.33285444 4.11450263]
|
||||
0 [-12.48534921] [-14.7906583]
|
||||
1 [-1.09712586e-14] [-5.19623863e-15]
|
||||
2 [-1.27068495e-16] [-2.9424428e-16]
|
||||
3 [5.91540705e-16] [7.2837521e-16]
|
||||
4 [-1.27068495e-16] [-2.9424428e-16]
|
||||
[[3.71369789]
|
||||
[3.2314999 ]]
|
||||
Eigenvalues of Hessian Matrix:[0.30237154 4.4642383 ]
|
||||
0 [-17.75091492] [-21.33108943]
|
||||
1 [-4.60742555e-15] [5.64228618e-16]
|
||||
2 [-5.34294831e-16] [-5.79981535e-16]
|
||||
3 [-5.34294831e-16] [-5.79981535e-16]
|
||||
4 [-5.34294831e-16] [-5.79981535e-16]
|
||||
beta from own Newton code
|
||||
[[3.66959644]
|
||||
[3.26513904]]
|
||||
[[3.71369789]
|
||||
[3.2314999 ]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1240,18 +1250,20 @@ beta from own Newton code
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
|
||||
[[3.68184997]
|
||||
[3.32507975]]
|
||||
Eigenvalues of Hessian Matrix:[0.26370919 4.62518501]
|
||||
theta from own gd
|
||||
[[3.68184997]
|
||||
[3.32507975]]
|
||||
[[4.39917327]
|
||||
[2.69542733]]
|
||||
Eigenvalues of Hessian Matrix:[0.29765192 4.0375827 ]
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/exercisesweek41_22_1.png" src="_images/exercisesweek41_22_1.png" />
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own gd
|
||||
[[4.39917327]
|
||||
[2.69542733]]
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/exercisesweek41_22_2.png" src="_images/exercisesweek41_22_2.png" />
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own sdg
|
||||
[[3.68809785]
|
||||
[3.32032017]]
|
||||
[[4.32234998]
|
||||
[2.64530585]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1333,15 +1345,17 @@ theta from own gd
|
||||
</div>
|
||||
<div class="cell_output docutils container">
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Own inversion
|
||||
[[3.55555773]
|
||||
[3.41891092]]
|
||||
Eigenvalues of Hessian Matrix:[0.30326262 4.34133193]
|
||||
[[3.7635689 ]
|
||||
[3.10080981]]
|
||||
Eigenvalues of Hessian Matrix:[0.31633433 3.9824638 ]
|
||||
theta from own gd
|
||||
[[3.55511609]
|
||||
[3.41928689]]
|
||||
theta from own sdg with momentum
|
||||
[[3.58207928]
|
||||
[3.37895549]]
|
||||
[[3.76366462]
|
||||
[3.1007216 ]]
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own sdg with momentum
|
||||
[[3.75707243]
|
||||
[3.12422141]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1416,9 +1430,9 @@ theta from own sdg with momentum
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own AdaGrad
|
||||
[[2.00039962]
|
||||
[2.99772199]
|
||||
[4.00233436]]
|
||||
[[1.99999956]
|
||||
[3.00000215]
|
||||
[3.99999797]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1500,9 +1514,9 @@ theta from own sdg with momentum
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own RMSprop
|
||||
[[1.99858411]
|
||||
[2.9981377 ]
|
||||
[3.99861427]]
|
||||
[[1.99907985]
|
||||
[2.99897733]
|
||||
[3.99754609]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1588,9 +1602,9 @@ theta from own sdg with momentum
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>theta from own ADAM
|
||||
[[2.00002678]
|
||||
[2.99985103]
|
||||
[4.00014662]]
|
||||
[[2.00003617]
|
||||
[2.99986253]
|
||||
[4.00012569]]
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1663,7 +1677,7 @@ It provides composable transformations of Python+NumPy programs: differentiate,
|
||||
return asarray(x, dtype=self.dtype)
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[<matplotlib.lines.Line2D at 0x1262b9a90>]
|
||||
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[<matplotlib.lines.Line2D at 0x11cb23a60>]
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/exercisesweek41_39_2.png" src="_images/exercisesweek41_39_2.png" />
|
||||
@@ -1702,7 +1716,7 @@ It provides composable transformations of Python+NumPy programs: differentiate,
|
||||
return asarray(x, dtype=self.dtype)
|
||||
</pre></div>
|
||||
</div>
|
||||
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span><matplotlib.collections.PathCollection at 0x126323b50>
|
||||
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span><matplotlib.collections.PathCollection at 0x11cb23fd0>
|
||||
</pre></div>
|
||||
</div>
|
||||
<img alt="_images/exercisesweek41_41_2.png" src="_images/exercisesweek41_41_2.png" />
|
||||
|
||||
Reference in New Issue
Block a user