Release site-v1.0.4 (part 2)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- lecture-02/assets/Katex-bEnhXSDx.js +0 -0
- lecture-02/assets/MLPDiagram-BzsWpYDE.js +1 -0
- lecture-02/assets/MLPDiagram-gYXOc7eY.css +1 -0
- lecture-02/assets/PerceptronDiagram-CmZJT5ND.js +1 -0
- lecture-02/assets/PerceptronDiagram-NkK4Qr8p.css +1 -0
- lecture-02/assets/PerceptronPlayground-B3aJX6mT.js +1 -0
- lecture-02/assets/PerceptronPlayground-CzG5dsRu.css +1 -0
- lecture-02/assets/PlotCurve-D4pyGHKn.js +1 -0
- lecture-02/assets/PlotLabel-B6EzJW_Y.js +1 -0
- lecture-02/assets/PlotLine-Bd5mLe7q.js +1 -0
- lecture-02/assets/PlotPoints-BmurSwXE.js +10 -0
- lecture-02/assets/SlideWrapper-DBNQYNtZ.css +1 -0
- lecture-02/assets/SlideWrapper-G9Z9lRKG.js +2 -0
- lecture-02/assets/Slider-BO0rW71G.css +1 -0
- lecture-02/assets/Slider-rBweDD_5.js +1 -0
- lecture-02/assets/StepButton-DiDduF86.js +1 -0
- lecture-02/assets/default-C3zMja2v.js +1 -0
- lecture-02/assets/index-BUWRHKMm.css +0 -0
- lecture-02/assets/index-DA2poVkj.js +46 -0
- lecture-02/assets/interactive--xmYYvz-.js +1 -0
- lecture-02/assets/interactive-DDMF3hhv.css +1 -0
- lecture-02/assets/iris-setosa-CYyB8_KQ.jpg +0 -0
- lecture-02/assets/iris-versicolor-DED4EHyk.jpg +0 -0
- lecture-02/assets/iris-virginica-7D5qYfzB.jpg +0 -0
- lecture-02/assets/md-5DLtPaNo.css +1 -0
- lecture-02/assets/md-7lDxlpo1.js +1 -0
- lecture-02/assets/md-B3UgphXe2.js +1 -0
- lecture-02/assets/md-B7lGhEuR.js +1 -0
- lecture-02/assets/md-B8SnQrGe.js +1 -0
- lecture-02/assets/md-BBQmf_mI2.js +1 -0
- lecture-02/assets/md-BF3AqBlu.js +1 -0
- lecture-02/assets/md-BLD5nLBc.js +1 -0
- lecture-02/assets/md-BNoRCXVZ.js +1 -0
- lecture-02/assets/md-BYiXaZfk.css +1 -0
- lecture-02/assets/md-Bb3RBvlb.js +1 -0
- lecture-02/assets/md-BdLjP6lQ.js +1 -0
- lecture-02/assets/md-Bdar9RKb.js +1 -0
- lecture-02/assets/md-BgkY7HbW.js +1 -0
- lecture-02/assets/md-BlW7fxDD.css +1 -0
- lecture-02/assets/md-Bt0SEe9U.js +1 -0
- lecture-02/assets/md-BtysGq6-.js +1 -0
- lecture-02/assets/md-Bv7Je2J8.js +1 -0
- lecture-02/assets/md-C4-Bg5un2.js +1 -0
- lecture-02/assets/md-C8lEeNrC.js +1 -0
- lecture-02/assets/md-C9QTaqTf.js +1 -0
- lecture-02/assets/md-CBkiQdVT.js +1 -0
- lecture-02/assets/md-CGp3oyRC.js +1 -0
- lecture-02/assets/md-CK-2SOMM.js +1 -0
- lecture-02/assets/md-CZnahp6h2.js +1 -0
- lecture-02/assets/md-Cl3pAsU7.js +2 -0
lecture-02/assets/Katex-bEnhXSDx.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lecture-02/assets/MLPDiagram-BzsWpYDE.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{B as e,C as t,E as n,U as r,V as i,_ as a,b as o,d as s,f as c,ft as l,g as u,m as d,tt as f,v as p,w as m,wt as h,x as g,xt as _,y as v}from"./modules/shiki-ZbpftOCw.js";import{t as y}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b}from"./slidev/context-Dg_28hwb.js";import{n as x}from"./interactive--xmYYvz-.js";import{t as S}from"./Katex-bEnhXSDx.js";import{t as ee}from"./StepButton-DiDduF86.js";import{n as te}from"./useRandom-CKuF3nnJ.js";var ne=[`viewBox`],re={key:0},ie={class:`dl-mlp__edges`},ae=[`x1`,`y1`,`x2`,`y2`,`marker-end`],oe={key:1,class:`dl-mlp__bias`},se=[`cx`,`cy`,`r`],ce=[`x`,`y`],le={dy:-5,class:`sup`},ue={class:`dl-mlp__nodes`},de=[`cx`,`cy`,`r`,`tabindex`,`role`,`aria-label`,`onClick`,`onKeydown`],fe=[`x`,`y`],pe={dy:2,class:`sub`},me={key:2,class:`dl-mlp__weights`},he=[`x`,`y`],ge={dy:2,class:`sub`},_e={key:3,class:`dl-mlp__labels`},ve=[`x`,`y`],ye={key:4,class:`dl-mlp__loss`},be=[`x`],xe={key:0},Se={key:1},Ce={class:`dl-mlp__count`},we={class:`dl-mlp__then`},C={key:3},w=y(n({__name:`MLPDiagram`,props:{layers:{default:()=>[4,6,5,3]},mode:{default:`procedure`},width:{default:520},height:{default:300},labels:{type:Boolean,default:!0},p:{default:.5},seed:{default:7}},setup(n){let{$slidev:y,$nav:w,$clicksContext:Te,$clicks:Ee,$page:De,$renderContext:Oe,$frontmatter:ke}=b(),T=n,E=l(`idle`),D=l(0),O=l(null),k=u(()=>T.mode===`links`),A=u(()=>T.mode===`dropout`),j=u(()=>T.layers.length),M=u(()=>k.value?15:8),N=u(()=>{let e=k.value?62:46,t=k.value?64:26,n=k.value?40:26,r=T.width-e*2,i=T.height-t-n,a=k.value?54:40;return T.layers.map((n,o)=>{let s=j.value===1?T.width/2:e+r*o/(j.value-1);return Array.from({length:n},(e,r)=>({x:s,y:t+i/2+(r-(n-1)/2)*Math.min(i/Math.max(n-1,1),a),layer:o,index:r}))})});function P(e){return e===0?`in`:e===j.value-1?`out`:j.value===3?`h`:`h${e}`}function F(e){return e===0?`x`:`a`}let I=u(()=>{if(!k.value)return[];let e=j.value>1?N.value[1][0].x-N.value[0][0].x:0;return T.layers.slice(1).map((t,n)=>{let r=n+1;return{x:N.value[r][0].x-e*.3,y:24,layer:r}})});function L(e,t,n,r,i){let a=n-e,o=r-t,s=Math.hypot(a,o)||1,c=a/s,l=o/s;return{x1:e+c*M.value,y1:t+l*M.value,x2:n-c*(M.value+i),y2:r-l*(M.value+i)}}let R=u(()=>{let e=k.value?5:0,t=[];for(let n=0;n<j.value-1;n++)for(let r of N.value[n])for(let i of N.value[n+1])t.push({...L(r.x,r.y,i.x,i.y,e),from:n,fromIndex:r.index,toIndex:i.index,bias:!1});for(let n of I.value)for(let r of N.value[n.layer])t.push({...L(n.x,n.y,r.x,r.y,e),from:n.layer-1,fromIndex:-1,toIndex:r.index,bias:!0});return t}),z=l(null),B=u(()=>N.value.slice(1).flat().map(e=>({layer:e.layer,index:e.index}))),V=u(()=>z.value===null?null:B.value[z.value]);function H(e,t){let n=B.value.findIndex(n=>n.layer===e&&n.index===t);z.value=n===-1||n===z.value?null:n}function Ae(){z.value=z.value===null?0:(z.value+1)%B.value.length}function U(e){return V.value!==null&&e.from===V.value.layer-1&&e.toIndex===V.value.index}function W(e){let t=.74;return{x:e.x1+(e.x2-e.x1)*t,y:e.y1+(e.y2-e.y1)*t-4}}let je=u(()=>{if(!V.value)return``;let{layer:e,index:t}=V.value,n=P(e),r=F(e-1),i=P(e-1),a=N.value[e-1].map(e=>`w^{(${n})}_{${t+1},${e.index+1}}\\, ${r}^{(${i})}_{${e.index+1}}`);return`z^{(${n})}_{${t+1}} = ${a.join(` + `)} + b^{(${n})}_{${t+1}}`}),Me=u(()=>V.value?T.layers[V.value.layer-1]:0),G=l(!1),K=l(0),q=u(()=>{let e=new Set;if(!A.value||!G.value)return e;let t=te(T.seed+K.value*7919);for(let n=1;n<j.value-1;n++)for(let r=0;r<T.layers[n];r++)t()<T.p&&e.add(`${n}-${r}`);return e});function J(e,t){return q.value.has(`${e}-${t}`)}function Ne(e){return!A.value||!G.value?!1:!e.bias&&J(e.from,e.fromIndex)||J(e.from+1,e.toIndex)}let Pe=u(()=>T.layers.slice(1,-1).reduce((e,t)=>e+t,0)),Y=u(()=>E.value===`forward`?D.value-1:E.value===`backward`?D.value:-1);function Fe(e){return E.value===`update`?`updating`:E.value===`forward`?e<D.value?`done`:e===D.value?`active`:`idle`:E.value===`backward`?e>D.value?`done`:e===D.value?`active`:`idle`:E.value===`loss`?e===j.value-1?`active`:`done`:`idle`}function Ie(e,t){return A.value?J(e,t)?`is-dropped`:`is-kept`:k.value?V.value&&V.value.layer===e&&V.value.index===t?`is-active`:V.value&&V.value.layer-1===e?`is-done`:`is-idle`:`is-${Fe(e)}`}function X(){O.value!==null&&(clearInterval(O.value),O.value=null)}e(X);function Z(){X(),E.value=`idle`,D.value=0}function Q(){switch(E.value){case`idle`:E.value=`forward`,D.value=0;break;case`forward`:D.value<j.value-1?D.value++:E.value=`loss`;break;case`loss`:E.value=`backward`,D.value=j.value-1;break;case`backward`:D.value>0?D.value--:E.value=`update`;break;case`update`:Z()}}function Le(){X(),Z(),Q(),O.value=window.setInterval(()=>{Q(),E.value===`idle`&&X()},620)}let Re={idle:`Ready. One pass = forward-propagate, compute the loss, backpropagate, then update.`,forward:`Forward-propagating the training patterns through the network.`,loss:`Comparing the output with the label to compute the loss.`,backward:`Backpropagating the loss — the same graph, walked in reverse.`,update:`Updating every weight and bias from its own partial derivative.`};function $(e){return e===0?k.value?`input layer (in)`:`input`:e===j.value-1?k.value?`output layer (out)`:`output`:k.value?`hidden layer (${P(e)})`:`hidden ${e}`}return(e,n)=>{let l=ee,u=S,y=x;return i(),p(y,{"max-width":k.value?`48rem`:`42rem`},g({default:f(()=>[(i(),o(`svg`,{class:_([`dl-mlp`,{"is-links":k.value}]),viewBox:`0 0 ${T.width} ${T.height}`,preserveAspectRatio:`xMidYMid meet`,role:`img`,"aria-label":`Multilayer neural network`},[k.value?(i(),o(`defs`,re,[...n[4]||=[a(`marker`,{id:`dl-mlp-head`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3`,orient:`auto`},[a(`path`,{d:`M0,0 L6,3 L0,6 z`,class:`dl-mlp__head`})],-1),a(`marker`,{id:`dl-mlp-head-on`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3`,orient:`auto`},[a(`path`,{d:`M0,0 L6,3 L0,6 z`,class:`dl-mlp__head is-on`})],-1)]])):v(`v-if`,!0),a(`g`,ie,[(i(!0),o(d,null,r(R.value,(e,t)=>(i(),o(`line`,{key:t,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,"marker-end":k.value?U(e)?`url(#dl-mlp-head-on)`:`url(#dl-mlp-head)`:void 0,class:_({"is-active":!k.value&&e.from===Y.value,"is-reverse":!k.value&&E.value===`backward`,"is-bias":e.bias,"is-incoming":k.value&&U(e),"is-faded":k.value&&V.value!==null&&!U(e),"is-cut":Ne(e)})},null,10,ae))),128))]),v(` Bias units: drawn after the edges so the links leave from behind them. `),k.value?(i(),o(`g`,oe,[(i(!0),o(d,null,r(I.value,e=>(i(),o(d,{key:`b${e.layer}`},[a(`circle`,{cx:e.x,cy:e.y,r:M.value,class:_({"is-active":V.value?.layer===e.layer})},null,10,se),a(`text`,{x:e.x,y:e.y+4,"text-anchor":`middle`},[n[5]||=t(` b`,-1),a(`tspan`,le,`(`+h(P(e.layer))+`)`,1)],8,ce)],64))),128))])):v(`v-if`,!0),a(`g`,ue,[(i(!0),o(d,null,r(N.value,(e,n)=>(i(),o(d,{key:n},[(i(!0),o(d,null,r(e,e=>(i(),o(`g`,{key:`${n}-${e.index}`},[a(`circle`,{cx:e.x,cy:e.y,r:M.value,class:_(Ie(n,e.index)),tabindex:k.value&&n>0?0:void 0,role:k.value&&n>0?`button`:void 0,"aria-label":k.value&&n>0?`unit ${e.index+1} of the ${$(n)}`:void 0,onClick:t=>k.value&&n>0&&H(n,e.index),onKeydown:[s(c(t=>k.value&&n>0&&H(n,e.index),[`prevent`]),[`enter`]),s(c(t=>k.value&&n>0&&H(n,e.index),[`prevent`]),[`space`])]},null,42,de),k.value?(i(),o(`text`,{key:0,class:`dl-mlp__unit`,x:e.x,y:e.y+4,"text-anchor":`middle`},[t(h(F(n)),1),a(`tspan`,pe,h(e.index+1),1)],8,fe)):v(`v-if`,!0)]))),128))],64))),128))]),k.value&&V.value?(i(),o(`g`,me,[(i(!0),o(d,null,r(R.value,(e,n)=>(i(),o(d,{key:`w${n}`},[U(e)?(i(),o(`text`,{key:0,x:W(e).x,y:W(e).y,"text-anchor":`middle`},[t(h(e.bias?`b`:`w`),1),a(`tspan`,ge,h(e.bias?e.toIndex+1:`${e.toIndex+1},${e.fromIndex+1}`),1)],8,he)):v(`v-if`,!0)],64))),128))])):v(`v-if`,!0),T.labels?(i(),o(`g`,_e,[(i(!0),o(d,null,r(N.value,(e,t)=>(i(),o(`text`,{key:`l${t}`,x:e[0].x,y:T.height-6,"text-anchor":`middle`},h($(t)),9,ve))),128))])):v(`v-if`,!0),E.value===`loss`?(i(),o(`g`,ye,[a(`text`,{x:T.width-14,y:18,"text-anchor":`end`},`loss`,8,be)])):v(`v-if`,!0)],10,ne))]),_:2},[T.mode===`static`?void 0:{name:`controls`,fn:f(()=>[A.value?(i(),o(d,{key:0},[m(l,{label:G.value?`Switch to model.eval()`:`Switch to model.train()`,onClick:n[0]||=e=>G.value=!G.value},null,8,[`label`]),m(l,{label:`New mini-batch`,variant:`ghost`,glyph:`↻`,disabled:!G.value,onClick:n[1]||=e=>K.value++},null,8,[`disabled`])],64)):k.value?(i(),o(d,{key:1},[m(l,{label:`Next unit`,glyph:`▸`,onClick:Ae}),m(l,{label:`Show the whole network`,variant:`ghost`,onClick:n[2]||=e=>z.value=null})],64)):(i(),o(d,{key:2},[m(l,{label:`Play a pass`,glyph:`▶`,onClick:Le}),m(l,{label:`Step`,variant:`ghost`,onClick:n[3]||=()=>{X(),Q()}}),m(l,{label:`Reset`,variant:`ghost`,onClick:Z})],64))]),key:`0`},T.mode===`static`?void 0:{name:`readout`,fn:f(()=>[A.value?(i(),o(d,{key:0},[G.value?(i(),o(`div`,xe,[n[6]||=a(`strong`,null,`Training.`,-1),t(` `+h(q.value.size)+` of the `+h(Pe.value)+` hidden units are switched off for this mini-batch, and every link into or out of them is gone with them. Each unit is dropped `,1),n[7]||=a(`em`,null,`independently`,-1),n[8]||=t(` with `,-1),m(u,{expr:`p = ${T.p}`},null,8,[`expr`]),n[9]||=t(`, so it is about half, not exactly half. Press `,-1),n[10]||=a(`strong`,null,`New mini-batch`,-1),n[11]||=t(`: a different set every time, so no unit can rely on any particular neighbour being there. `,-1)])):(i(),o(`div`,Se,[...n[12]||=[a(`strong`,null,`Evaluation.`,-1),t(` Every unit is present and nothing is dropped. This is what `,-1),a(`code`,null,`model.eval()`,-1),t(` selects, and forgetting to call it is why a model can score worse on the test set than it did while training. `,-1)]]))],64)):k.value?V.value?(i(),o(d,{key:2},[a(`div`,Ce,[n[13]||=t(` This unit has `,-1),a(`strong`,null,h(Me.value),1),n[14]||=t(` incoming links — one weight per unit of the previous layer — plus `,-1),n[15]||=a(`strong`,null,`one bias`,-1),n[16]||=t(`. It adds them up: `,-1)]),m(u,{expr:je.value},null,8,[`expr`]),a(`span`,we,[n[17]||=t(`, then `,-1),m(u,{expr:`a^{(${P(V.value.layer)})}_{${V.value.index+1}} = \\sigma\\bigl(z^{(${P(V.value.layer)})}_{${V.value.index+1}}\\bigr)`},null,8,[`expr`])])],64)):(i(),o(`span`,C,[...n[18]||=[t(` Every unit is joined to `,-1),a(`em`,null,`every`,-1),t(` unit of the layer before it, and each of those links carries one weight. Click a unit — or press `,-1),a(`strong`,null,`Next unit`,-1),t(` — to see the links that feed it. `,-1)]])):(i(),o(`span`,{key:1,class:_({"is-live":E.value!==`idle`})},h(Re[E.value]),3))]),key:`1`}]),1032,[`max-width`])}}}),[[`__scopeId`,`data-v-7924cae0`]]);export{w as t};
|
lecture-02/assets/MLPDiagram-gYXOc7eY.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-mlp[data-v-7924cae0]{width:100%;height:100%}.dl-mlp__edges line[data-v-7924cae0]{stroke:var(--dl-muted);stroke-width:.5px;transition:stroke .25s,stroke-width .25s}.dl-mlp.is-links .dl-mlp__edges line[data-v-7924cae0]{stroke:var(--dl-muted);stroke-width:.9px}.dl-mlp.is-links .dl-mlp__edges line.is-bias[data-v-7924cae0]{stroke-dasharray:3 3}.dl-mlp.is-links .dl-mlp__edges line.is-faded[data-v-7924cae0]{stroke:var(--dl-border);stroke-width:.6px}.dl-mlp.is-links .dl-mlp__edges line.is-incoming[data-v-7924cae0]{stroke:var(--dl-accent);stroke-width:2px}.dl-mlp__head[data-v-7924cae0]{fill:var(--dl-muted)}.dl-mlp__head.is-on[data-v-7924cae0]{fill:var(--dl-accent)}.dl-mlp__edges line.is-active[data-v-7924cae0]{stroke:var(--dl-accent);stroke-width:1.8px}.dl-mlp__edges line.is-active.is-reverse[data-v-7924cae0]{stroke:var(--dl-danger)}.dl-mlp__nodes circle[data-v-7924cae0],.dl-mlp__bias circle[data-v-7924cae0]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.5px;transition:fill .25s,stroke .25s}.dl-mlp__nodes circle.is-done[data-v-7924cae0],.dl-mlp__bias circle.is-active[data-v-7924cae0]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-mlp__nodes circle.is-active[data-v-7924cae0]{fill:var(--dl-accent);stroke:var(--dl-accent-strong)}.dl-mlp__nodes circle.is-kept[data-v-7924cae0]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-mlp__nodes circle.is-dropped[data-v-7924cae0]{fill:var(--dl-bg);stroke:var(--dl-border);stroke-dasharray:3 2}.dl-mlp__edges line.is-cut[data-v-7924cae0]{stroke:var(--dl-border);stroke-width:.35px;stroke-dasharray:2 4}.dl-mlp__nodes circle.is-updating[data-v-7924cae0]{fill:var(--dl-heading);stroke:var(--dl-heading)}.dl-mlp.is-links .dl-mlp__nodes circle[role=button][data-v-7924cae0]{cursor:pointer}.dl-mlp__nodes circle[data-v-7924cae0]:focus-visible{outline:2px solid var(--dl-accent);outline-offset:2px}.dl-mlp__unit[data-v-7924cae0],.dl-mlp__bias text[data-v-7924cae0]{fill:var(--dl-heading);pointer-events:none;font-size:11px;font-style:italic}.dl-mlp__nodes circle.is-active+.dl-mlp__unit[data-v-7924cae0]{fill:#fff}.dl-mlp .sub[data-v-7924cae0],.dl-mlp .sup[data-v-7924cae0]{font-size:7px;font-style:normal}.dl-mlp__weights text[data-v-7924cae0]{fill:var(--dl-accent-strong);paint-order:stroke;stroke:var(--dl-bg);stroke-width:2.5px;stroke-linejoin:round;font-size:9px;font-style:italic}.dl-mlp__labels text[data-v-7924cae0]{fill:var(--dl-muted);font-size:11px}.dl-mlp__loss text[data-v-7924cae0]{fill:var(--dl-danger);font-size:13px;font-weight:600}.dl-mlp__count[data-v-7924cae0]{margin-bottom:.15rem}.dl-mlp__then[data-v-7924cae0] .katex{font-size:.95em}.is-live[data-v-7924cae0]{color:var(--dl-body)}
|
lecture-02/assets/PerceptronDiagram-CmZJT5ND.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,U as n,V as r,_ as i,b as a,c as o,ft as s,g as c,m as l,nt as u,tt as d,v as f,w as p,wt as m,x as h,xt as g,y as _}from"./modules/shiki-ZbpftOCw.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y}from"./slidev/context-Dg_28hwb.js";import{n as b}from"./interactive--xmYYvz-.js";import{t as x}from"./Katex-bEnhXSDx.js";import{t as S}from"./StepButton-DiDduF86.js";import{t as C}from"./Slider-rBweDD_5.js";var w={viewBox:`0 0 660 268`,class:`dl-pd`,role:`img`,"aria-label":`A perceptron: inputs, weights, summation, unit step, prediction, comparison with the true label, and the error feeding back into the weights`},T=[`cy`],ee=[`y`],te=[`y`],E=[`y1`],D=[`x`,`y`],O={class:`is-w`},k={x:`261`,y:`102`,class:`num`},A={x:`528`,y:`54`,class:`sym is-small`},ne={x:`340`,y:`236`,class:`err-lbl`,"text-anchor":`middle`},re={class:`is-mono`},ie={class:`dl-pd__toggle`},ae={key:0,class:`dl-pd__verdict`},j={key:1,class:`dl-pd__verdict is-err`},M={class:`dl-pd__hint`},N={class:`dl-pd__state`},P=v(t({__name:`PerceptronDiagram`,props:{static:{type:Boolean,default:!1}},setup(t){let{$slidev:v,$nav:P,$clicksContext:oe,$clicks:se,$page:ce,$renderContext:le,$frontmatter:ue}=y(),F=t,I={w1:.4,w2:-.3,b:-.2},L=s(2),R=s(1.5),z=s(1),B=s(.1),V=s(I.w1),H=s(I.w2),U=s(I.b),W=s(0),G=c(()=>V.value*L.value+H.value*R.value+U.value),K=c(()=>+(G.value>=0)),q=c(()=>z.value-K.value),J=c(()=>q.value===0),Y=c(()=>B.value*q.value*L.value),X=c(()=>B.value*q.value*R.value),Z=c(()=>B.value*q.value);function de(){let[e,t,n]=[Y.value,X.value,Z.value];V.value+=e,H.value+=t,U.value+=n,W.value++}function fe(){V.value=I.w1,H.value=I.w2,U.value=I.b,W.value=0}let Q=(e,t=2)=>e.toFixed(t),$=(e,t=2)=>e===0?e.toFixed(t):e>0?`+${e.toFixed(t)}`:e.toFixed(t),pe=c(()=>[{y:66,sym:`x₁`,val:Q(L.value,1),w:`w₁`,wv:Q(V.value),lx:90,ly:64},{y:112,sym:`x₂`,val:Q(R.value,1),w:`w₂`,wv:Q(H.value),lx:90,ly:107},{y:158,sym:`1`,val:``,w:`b`,wv:Q(U.value),lx:90,ly:134}]);return(t,s)=>{let c=C,v=S,y=x,P=b;return r(),f(P,{"max-width":`54rem`},h({default:d(()=>[(r(),a(`svg`,w,[s[9]||=i(`defs`,null,[i(`marker`,{id:`dl-pd-tip`,markerWidth:`8`,markerHeight:`8`,refX:`7`,refY:`4`,orient:`auto`},[i(`path`,{d:`M0,0 L8,4 L0,8 Z`,fill:`var(--dl-muted)`})]),i(`marker`,{id:`dl-pd-tip-err`,markerWidth:`8`,markerHeight:`8`,refX:`7`,refY:`4`,orient:`auto`},[i(`path`,{d:`M0,0 L8,4 L0,8 Z`,fill:`var(--dl-danger)`})])],-1),_(` inputs and the weighted edges `),(r(!0),a(l,null,n(pe.value,t=>(r(),a(`g`,{key:t.sym},[i(`circle`,{cx:`42`,cy:t.y,r:`18`,class:`node`},null,8,T),i(`text`,{x:`42`,y:t.val?t.y-2:t.y+5,class:`sym`},m(t.sym),9,ee),t.val?(r(),a(`text`,{key:0,x:`42`,y:t.y+13,class:`sym is-small`},m(t.val),9,te)):_(`v-if`,!0),i(`line`,{x1:`60`,y1:t.y,x2:`184`,y2:`112`,class:`edge`,"marker-end":`url(#dl-pd-tip)`},null,8,E),i(`text`,{x:t.lx,y:t.ly,class:`wname`},[e(m(t.w)+` = `,1),i(`tspan`,O,m(t.wv),1)],8,D)]))),128)),_(` net input `),s[10]||=i(`circle`,{cx:`206`,cy:`112`,r:`24`,class:`node is-op`},null,-1),s[11]||=i(`text`,{x:`206`,y:`120`,class:`sym is-big`},`Σ`,-1),s[12]||=i(`text`,{x:`206`,y:`152`,class:`cap`},`net input`,-1),s[13]||=i(`line`,{x1:`230`,y1:`112`,x2:`292`,y2:`112`,class:`edge`,"marker-end":`url(#dl-pd-tip)`},null,-1),i(`text`,k,`z = `+m(Q(G.value)),1),_(` activation `),s[14]||=i(`circle`,{cx:`316`,cy:`112`,r:`24`,class:`node is-op`},null,-1),s[15]||=i(`path`,{d:`M302,120 L316,120 L316,102 L330,102`,class:`glyph`},null,-1),s[16]||=i(`text`,{x:`316`,y:`152`,class:`cap`},`unit step`,-1),s[17]||=i(`line`,{x1:`340`,y1:`112`,x2:`402`,y2:`112`,class:`edge`,"marker-end":`url(#dl-pd-tip)`},null,-1),_(` prediction `),i(`circle`,{cx:`426`,cy:`112`,r:`22`,class:g([`node`,{"is-fire":K.value===1}])},null,2),i(`text`,{x:`426`,y:`108`,class:g([`sym`,{"is-inverted":K.value===1}])},`ŷ`,2),i(`text`,{x:`426`,y:`123`,class:g([`sym is-small`,{"is-inverted":K.value===1}])},m(K.value),3),s[18]||=i(`text`,{x:`426`,y:`152`,class:`cap`},`prediction`,-1),s[19]||=i(`line`,{x1:`448`,y1:`112`,x2:`504`,y2:`112`,class:`edge`,"marker-end":`url(#dl-pd-tip)`},null,-1),_(` the true label, and the comparison `),s[20]||=i(`circle`,{cx:`528`,cy:`42`,r:`20`,class:`node is-truth`},null,-1),s[21]||=i(`text`,{x:`528`,y:`39`,class:`sym`},`y`,-1),i(`text`,A,m(z.value),1),s[22]||=i(`text`,{x:`528`,y:`20`,class:`cap`},`true label`,-1),s[23]||=i(`line`,{x1:`528`,y1:`62`,x2:`528`,y2:`88`,class:`edge is-err`,"marker-end":`url(#dl-pd-tip-err)`},null,-1),s[24]||=i(`circle`,{cx:`528`,cy:`112`,r:`22`,class:`node is-compare`},null,-1),s[25]||=i(`text`,{x:`528`,y:`119`,class:`sym is-err`},`−`,-1),s[26]||=i(`text`,{x:`528`,y:`152`,class:`cap is-err`},`compare`,-1),_(` the error, back to the weights `),s[27]||=i(`path`,{d:`M528,134 L528,214 L146,214 L146,134`,class:`edge is-err`,fill:`none`,"marker-end":`url(#dl-pd-tip-err)`},null,-1),i(`text`,ne,[s[4]||=e(` error `,-1),i(`tspan`,re,`e = y − ŷ = `+m($(q.value,0)),1),s[5]||=e(` · update `,-1),s[6]||=i(`tspan`,{class:`is-mono`},`Δwⱼ = η e xⱼ`,-1),s[7]||=e(`, `,-1),s[8]||=i(`tspan`,{class:`is-mono`},`Δb = η e`,-1)])]))]),_:2},[F.static?void 0:{name:`controls`,fn:d(()=>[p(c,{modelValue:L.value,"onUpdate:modelValue":s[0]||=e=>L.value=e,label:`x₁`,min:0,max:5,step:.1,precision:1,class:`dl-pd__s`},null,8,[`modelValue`]),p(c,{modelValue:R.value,"onUpdate:modelValue":s[1]||=e=>R.value=e,label:`x₂`,min:0,max:5,step:.1,precision:1,class:`dl-pd__s`},null,8,[`modelValue`]),p(c,{modelValue:B.value,"onUpdate:modelValue":s[2]||=e=>B.value=e,label:`η`,min:.01,max:.5,step:.01,class:`dl-pd__s`},null,8,[`modelValue`]),i(`label`,ie,[u(i(`input`,{"onUpdate:modelValue":s[3]||=e=>z.value=e,type:`checkbox`,"true-value":1,"false-value":0},null,512),[[o,z.value]]),s[28]||=e(` true label y = 1 `,-1)]),p(v,{label:`Apply update`,glyph:`↺`,disabled:J.value,onClick:de},null,8,[`disabled`]),p(v,{label:`Reset weights`,variant:`ghost`,onClick:fe})]),key:`0`},F.static?void 0:{name:`readout`,fn:d(()=>[J.value?(r(),a(`div`,ae,[s[29]||=i(`strong`,null,`Prediction correct`,-1),s[30]||=e(` — `,-1),p(y,{expr:`y = \\hat{y} = ${z.value}`},null,8,[`expr`]),s[31]||=e(`, so `,-1),p(y,{expr:`e = 0`}),s[32]||=e(` and every update is zero. The rule learns only from its mistakes. `,-1)])):(r(),a(`div`,j,[s[35]||=i(`strong`,null,`Prediction wrong`,-1),s[36]||=e(` — `,-1),p(y,{expr:`\\Delta w_1 = ${Q(B.value)}\\cdot(${q.value})\\cdot${Q(L.value,1)} = ${$(Y.value)}`},null,8,[`expr`]),s[37]||=e(`, `,-1),p(y,{expr:`\\Delta w_2 = ${$(X.value)}`},null,8,[`expr`]),s[38]||=e(`, `,-1),p(y,{expr:`\\Delta b = ${$(Z.value)}`},null,8,[`expr`]),i(`span`,M,[s[33]||=e(` — no `,-1),p(y,{expr:`x`}),s[34]||=e(` in the bias update.`,-1)])])),i(`div`,N,[p(y,{expr:`w_1 = ${Q(V.value)},\\; w_2 = ${Q(H.value)},\\; b = ${Q(U.value)}`},null,8,[`expr`]),e(` · `+m(W.value)+` update`+m(W.value===1?``:`s`)+` applied `,1)])]),key:`1`}]),1024)}}}),[[`__scopeId`,`data-v-d84988b9`]]);export{P as t};
|
lecture-02/assets/PerceptronDiagram-NkK4Qr8p.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-pd[data-v-d84988b9]{width:100%;height:100%}.node[data-v-d84988b9]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.6px;transition:fill .2s,stroke .2s}.node.is-op[data-v-d84988b9]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.node.is-fire[data-v-d84988b9]{fill:var(--dl-accent);stroke:var(--dl-accent-strong)}.node.is-truth[data-v-d84988b9],.node.is-compare[data-v-d84988b9]{stroke:var(--dl-danger)}.edge[data-v-d84988b9]{stroke:var(--dl-muted);stroke-width:1.5px;fill:none}.edge.is-err[data-v-d84988b9]{stroke:var(--dl-danger);stroke-dasharray:5 4}.glyph[data-v-d84988b9]{fill:none;stroke:var(--dl-accent-strong);stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}.sym[data-v-d84988b9]{fill:var(--dl-heading);text-anchor:middle;pointer-events:none;font-size:13px}.sym.is-big[data-v-d84988b9]{font-size:20px}.sym.is-small[data-v-d84988b9]{fill:var(--dl-muted);font-size:11px}.sym.is-err[data-v-d84988b9]{fill:var(--dl-danger);font-size:18px}.sym.is-inverted[data-v-d84988b9],.sym.is-small.is-inverted[data-v-d84988b9]{fill:#fff}.num[data-v-d84988b9]{fill:var(--dl-heading);text-anchor:middle;font-variant-numeric:tabular-nums;pointer-events:none;font-size:11px}.wname[data-v-d84988b9]{fill:var(--dl-muted);text-anchor:middle;font-size:11px}.wname .is-w[data-v-d84988b9]{fill:var(--dl-accent-strong);font-variant-numeric:tabular-nums;font-weight:600}.cap[data-v-d84988b9]{fill:var(--dl-muted);text-anchor:middle;letter-spacing:.04em;text-transform:uppercase;font-size:9.5px}.cap.is-err[data-v-d84988b9]{fill:var(--dl-danger)}.err-lbl[data-v-d84988b9]{fill:var(--dl-danger);font-size:11px}.err-lbl .is-mono[data-v-d84988b9]{fill:var(--dl-heading);font-variant-numeric:tabular-nums}.dl-pd__s[data-v-d84988b9]{min-width:7.5rem}.dl-pd__toggle[data-v-d84988b9]{cursor:pointer;align-items:center;gap:.35rem;font-size:.8rem;display:inline-flex}.dl-pd__toggle input[data-v-d84988b9]{accent-color:var(--dl-danger)}.dl-pd__verdict.is-err[data-v-d84988b9]{color:var(--dl-danger)}.dl-pd__hint[data-v-d84988b9]{color:var(--dl-muted)}.dl-pd__state[data-v-d84988b9]{margin-top:.15rem}
|
lecture-02/assets/PerceptronPlayground-B3aJX6mT.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,Q as n,U as r,V as i,_ as a,b as o,c as s,ft as c,g as l,m as u,nt as ee,tt as d,v as f,w as p,wt as m,y as h}from"./modules/shiki-ZbpftOCw.js";import{t as g}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as _}from"./slidev/context-Dg_28hwb.js";import{n as te}from"./interactive--xmYYvz-.js";import{t as ne}from"./Katex-bEnhXSDx.js";import{t as re}from"./StepButton-DiDduF86.js";import{t as ie}from"./Slider-rBweDD_5.js";import{n as ae,t as oe}from"./PlotPoints-BmurSwXE.js";import{t as se}from"./PlotLabel-B6EzJW_Y.js";import{t as ce}from"./PlotLine-Bd5mLe7q.js";import{t as le}from"./PlotCurve-D4pyGHKn.js";import{t as v}from"./useRandom-CKuF3nnJ.js";var y={class:`dl-perc__panes`},b={class:`dl-perc__toggle`},ue={class:`dl-perc__weights`},x={key:0},S={key:1},de={key:0,class:`dl-perc__done`},fe={key:1,class:`dl-perc__warn`},C=g(t({__name:`PerceptronPlayground`,props:{mode:{default:`train`},separable:{type:Boolean,default:!0},eta:{default:.1},points:{default:24},seed:{default:20260101}},setup(t){let{$slidev:g,$nav:C,$clicksContext:w,$clicks:T,$page:pe,$renderContext:me,$frontmatter:he}=_(),E=t,D=[-1,7],O=l(()=>E.mode===`boundary`),k={w1:1,w2:1,b:-6},A=c(E.separable),j=c(E.eta),M=c(O.value?k.w1:0),N=c(O.value?k.w2:0),P=c(O.value?k.b:0),F=c(0),I=c(0),L=c(0),R=c(null),z=l(()=>{let e=v(E.seed),t=.62,n=A.value?2.4:.3,r=[];for(let i=0;i<E.points;i++){let a=i%2==0?0:1,o=3+(a===1?n:-n),s=3+(a===1?n*.55:-n*.55);r.push({x:o+e()*t,y:s+e()*t,label:a})}return r}),B=e=>M.value*e.x+N.value*e.y+P.value,V=e=>+(B(e)>=0),H=l(()=>z.value.filter(e=>V(e)!==e.label).length),U=l(()=>H.value===0&&I.value>0);function W(){M.value=O.value?k.w1:0,N.value=O.value?k.w2:0,P.value=O.value?k.b:0,F.value=0,I.value=0,L.value=0,R.value=null}n(A,W);function G(){let e=F.value%z.value.length,t=z.value[e],n=t.label-V(t);n!==0&&(M.value+=j.value*n*t.x,N.value+=j.value*n*t.y,P.value+=j.value*n,I.value++),R.value=e,F.value++,F.value%z.value.length===0&&L.value++}function ge(){let e=z.value.length-F.value%z.value.length;for(let t=0;t<e;t++)G()}let K=l(()=>{let[e,t]=D;if(Math.abs(N.value)>1e-9){let n=e=>-(M.value*e+P.value)/N.value;return{from:[e,n(e)],to:[t,n(t)]}}if(Math.abs(M.value)>1e-9){let n=-P.value/M.value;return{from:[n,e],to:[n,t]}}return null}),q=l(()=>Math.abs(N.value)<1e-9?null:{fn:e=>-(M.value*e+P.value)/N.value,fillTo:N.value>0?D[1]:D[0]}),_e=l(()=>{let[e,t]=D,n=.5,r=[[t-n,t-n],[e+n,e+n]],i=r.map(([e,t])=>M.value*e+N.value*t+P.value);return i[0]*i[1]>=0?[]:r.map((e,t)=>({at:e,text:i[t]>=0?`σ(z) = 1`:`σ(z) = 0`,anchor:t===0?`end`:`start`}))}),J=l(()=>z.value.map((e,t)=>({x:e.x,y:e.y,cls:V(e)===e.label?`ok${e.label}`:`wrong`,highlight:t===R.value}))),Y=l(()=>z.value.map(B)),X=l(()=>{let e=Y.value,t=Math.max(Math.max(...e.map(Math.abs)),1)*1.15;return[-t,t]}),Z=l(()=>{let[e,t]=X.value;return{off:[[e,0],[0,0]],on:[[0,1],[t,1]]}}),ve=l(()=>z.value.map((e,t)=>({x:Y.value[t],y:V(e),cls:V(e)===e.label?`ok${e.label}`:`wrong`}))),Q={ok0:`var(--dl-accent)`,ok1:`var(--dl-heading)`,wrong:`var(--dl-danger)`},$={ok0:`circle`,ok1:`square`,wrong:`triangle`};return(t,n)=>{let c=le,l=ce,g=oe,_=se,v=ae,C=ie,w=re,T=ne,pe=te;return i(),f(pe,{"max-width":O.value?`52rem`:`44rem`},{controls:d(()=>[O.value?(i(),o(u,{key:0},[p(C,{modelValue:M.value,"onUpdate:modelValue":n[0]||=e=>M.value=e,label:`w₁`,min:-2,max:2,step:.05,class:`dl-perc__w`},null,8,[`modelValue`]),p(C,{modelValue:N.value,"onUpdate:modelValue":n[1]||=e=>N.value=e,label:`w₂`,min:-2,max:2,step:.05,class:`dl-perc__w`},null,8,[`modelValue`]),p(C,{modelValue:P.value,"onUpdate:modelValue":n[2]||=e=>P.value=e,label:`b`,min:-9,max:9,step:.1,precision:1,class:`dl-perc__w`},null,8,[`modelValue`]),p(w,{label:`Reset`,variant:`ghost`,onClick:W})],64)):(i(),o(u,{key:1},[p(w,{label:`One sample`,glyph:`▶`,disabled:U.value,onClick:G},null,8,[`disabled`]),p(w,{label:`One epoch`,variant:`ghost`,disabled:U.value,onClick:ge},null,8,[`disabled`]),p(w,{label:`Reset`,variant:`ghost`,onClick:W}),p(C,{modelValue:j.value,"onUpdate:modelValue":n[3]||=e=>j.value=e,label:`learning rate η`,min:.01,max:.5,step:.01,class:`dl-perc__eta`},null,8,[`modelValue`]),a(`label`,b,[ee(a(`input`,{"onUpdate:modelValue":n[4]||=e=>A.value=e,type:`checkbox`},null,512),[[s,A.value]]),n[5]||=e(` linearly separable `,-1)])],64))]),readout:d(()=>[a(`div`,ue,[p(T,{expr:`w_1 = ${M.value.toFixed(2)},\\; w_2 = ${N.value.toFixed(2)},\\; b = ${P.value.toFixed(2)}`},null,8,[`expr`])]),O.value?(i(),o(`div`,x,[n[6]||=e(` The line is where `,-1),p(T,{expr:`z = 0`}),e(`; the shaded side is where the neuron fires · `+m(H.value)+` of `+m(z.value.length)+` points on the wrong side `,1)])):(i(),o(`div`,S,[e(m(H.value)+` misclassified of `+m(z.value.length)+` · `+m(I.value)+` weight update`+m(I.value===1?``:`s`)+` · `+m(L.value)+` epoch`+m(L.value===1?``:`s`)+` `,1),U.value?(i(),o(`span`,de,`converged — no error left to learn from`)):!A.value&&L.value>=3?(i(),o(`span`,fe,` still updating: the classes overlap, so the rule never settles `)):h(`v-if`,!0)]))]),default:d(()=>[a(`div`,y,[p(v,{"x-domain":D,"y-domain":D,width:O.value?400:480,height:330,"x-label":`x₁`,"y-label":`x₂`,"x-ticks":5,"y-ticks":5},{default:d(()=>[q.value?(i(),f(c,{key:0,fn:q.value.fn,"fill-to":q.value.fillTo,color:`var(--dl-accent)`,width:0},null,8,[`fn`,`fill-to`])):h(`v-if`,!0),K.value?(i(),f(l,{key:1,from:K.value.from,to:K.value.to,color:`var(--dl-accent-strong)`,width:2.5},null,8,[`from`,`to`])):h(`v-if`,!0),p(g,{points:J.value,colors:Q,shapes:$,radius:6},null,8,[`points`]),(i(!0),o(u,null,r(_e.value,(e,t)=>(i(),f(_,{key:t,at:e.at,text:e.text,anchor:e.anchor,dx:0,dy:0,color:`var(--dl-muted)`,size:11},null,8,[`at`,`text`,`anchor`]))),128))]),_:1},8,[`width`]),O.value?(i(),f(v,{key:0,"x-domain":X.value,"y-domain":[-.3,1.3],width:280,height:330,"x-label":`z = w₁x₁ + w₂x₂ + b`,"y-label":`σ(z)`,"x-ticks":4,"y-ticks":[0,1]},{default:d(()=>[p(c,{points:Z.value.off,color:`var(--dl-accent-strong)`,width:2.5},null,8,[`points`]),p(c,{points:Z.value.on,color:`var(--dl-accent-strong)`,width:2.5},null,8,[`points`]),p(l,{from:[0,0],to:[0,1],color:`var(--dl-accent-strong)`,width:1.5,dashed:``}),p(g,{points:ve.value,colors:Q,shapes:$,radius:4,opacity:.6},null,8,[`points`])]),_:1},8,[`x-domain`])):h(`v-if`,!0)])]),_:1},8,[`max-width`])}}}),[[`__scopeId`,`data-v-79e2941e`]]);export{C as t};
|
lecture-02/assets/PerceptronPlayground-CzG5dsRu.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-perc__panes[data-v-79e2941e]{justify-content:center;align-items:center;gap:.6rem;width:100%;height:100%;min-height:0;display:flex}.dl-perc__eta[data-v-79e2941e]{min-width:10rem}.dl-perc__w[data-v-79e2941e]{min-width:7.5rem}.dl-perc__toggle[data-v-79e2941e]{cursor:pointer;align-items:center;gap:.35rem;font-size:.8rem;display:inline-flex}.dl-perc__toggle input[data-v-79e2941e]{accent-color:var(--dl-accent)}.dl-perc__weights[data-v-79e2941e]{margin-bottom:.15rem;font-size:.95rem}.dl-perc__done[data-v-79e2941e]{color:var(--dl-accent);margin-left:.4rem;font-weight:600}.dl-perc__warn[data-v-79e2941e]{color:var(--dl-danger);margin-left:.4rem}
|
lecture-02/assets/PlotCurve-D4pyGHKn.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ct as e,E as t,U as n,V as r,b as i,g as a,m as o,y as s}from"./modules/shiki-ZbpftOCw.js";import{n as c}from"./slidev/context-Dg_28hwb.js";import{r as l}from"./PlotPoints-BmurSwXE.js";var u={class:`dl-curve`},d=[`d`,`fill`],f=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],p=t({__name:`PlotCurve`,props:{fn:{},points:{},samples:{default:160},color:{},width:{default:2.5},dashed:{type:Boolean,default:!1},fillTo:{},opacity:{default:1}},setup(t){let{$slidev:p,$nav:m,$clicksContext:h,$clicks:g,$page:_,$renderContext:v,$frontmatter:y}=c(),b=t,x=l(),S=a(()=>{if(b.points)return b.points.map(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e);if(!b.fn)return[];let[e,t]=x.xDomain.value,n=Math.max(b.samples,2),r=[];for(let i=0;i<n;i++){let a=e+(t-e)*i/(n-1);r.push({x:a,y:b.fn(a)})}return r}),C=a(()=>{let[e,t]=x.yDomain.value,n=(t-e)*4,r=[],i=[];for(let a of S.value){if(!(Number.isFinite(a.y)&&a.y>e-n&&a.y<t+n)){i.length>1&&r.push(i.join(` `)),i=[];continue}i.push(`${i.length?`L`:`M`}${x.sx(a.x).toFixed(2)},${x.sy(a.y).toFixed(2)}`)}return i.length>1&&r.push(i.join(` `)),r}),w=a(()=>{if(b.fillTo===void 0||!S.value.length)return null;let[e,t]=x.yDomain.value,n=S.value.filter(e=>Number.isFinite(e.y));if(n.length<2)return null;let r=n=>Math.min(Math.max(n,e),t),i=n.map((e,t)=>`${t?`L`:`M`}${x.sx(e.x).toFixed(2)},${x.sy(r(e.y)).toFixed(2)}`).join(` `),a=x.sy(r(b.fillTo)).toFixed(2);return`${i} L${x.sx(n[n.length-1].x).toFixed(2)},${a} L${x.sx(n[0].x).toFixed(2)},${a} Z`});return(t,a)=>(r(),i(`g`,u,[w.value?(r(),i(`path`,{key:0,d:w.value,fill:b.color??`var(--dl-accent)`,style:e({opacity:.12*b.opacity}),stroke:`none`},null,12,d)):s(`v-if`,!0),(r(!0),i(o,null,n(C.value,(t,n)=>(r(),i(`path`,{key:n,d:t,fill:`none`,stroke:b.color??`var(--dl-accent)`,"stroke-width":b.width,"stroke-dasharray":b.dashed?`6 5`:void 0,style:e({opacity:b.opacity}),"stroke-linecap":`round`,"stroke-linejoin":`round`},null,12,f))),128))]))}});export{p as t};
|
lecture-02/assets/PlotLabel-B6EzJW_Y.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,V as n,W as r,_ as i,b as a,g as o,wt as s,y as c}from"./modules/shiki-ZbpftOCw.js";import{n as l}from"./slidev/context-Dg_28hwb.js";import{r as u}from"./PlotPoints-BmurSwXE.js";var d={class:`dl-plot-label`},f=[`x1`,`y1`,`x2`,`y2`,`stroke`],p=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`font-weight`],m=t({__name:`PlotLabel`,props:{at:{},text:{},dx:{default:8},dy:{default:-8},anchor:{default:`start`},color:{},size:{default:12},leader:{type:Boolean,default:!1},bold:{type:Boolean,default:!1}},setup(t){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l(),x=t,S=u(),C=o(()=>({x:S.sx(x.at[0]),y:S.sy(x.at[1])})),w=o(()=>({x:C.value.x+x.dx,y:C.value.y+x.dy}));return(t,o)=>(n(),a(`g`,d,[x.leader?(n(),a(`line`,{key:0,x1:C.value.x,y1:C.value.y,x2:w.value.x-(x.anchor===`end`?-4:4),y2:w.value.y+3,stroke:x.color??`var(--dl-muted)`,"stroke-width":`1`},null,8,f)):c(`v-if`,!0),i(`text`,{x:w.value.x,y:w.value.y,"text-anchor":x.anchor,fill:x.color??`var(--dl-body)`,"font-size":x.size,"font-weight":x.bold?600:400},[r(t.$slots,`default`,{},()=>[e(s(x.text),1)])],8,p)]))}});export{m as t};
|
lecture-02/assets/PlotLine-Bd5mLe7q.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ct as e,E as t,J as n,V as r,_ as i,b as a,g as o,y as s}from"./modules/shiki-ZbpftOCw.js";import{n as c}from"./slidev/context-Dg_28hwb.js";import{r as l}from"./PlotPoints-BmurSwXE.js";var u={key:0},d=[`fill`],f=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`,`marker-end`],p=t({__name:`PlotLine`,props:{from:{},to:{},color:{},width:{default:2},dashed:{type:Boolean,default:!1},arrow:{type:Boolean,default:!1},opacity:{default:1}},setup(t){let{$slidev:p,$nav:m,$clicksContext:h,$clicks:g,$page:_,$renderContext:v,$frontmatter:y}=c(),b=t,x=l(),S=`dl-arrow-${n()}`,C=o(()=>({x:x.sx(b.from[0]),y:x.sy(b.from[1])})),w=o(()=>({x:x.sx(b.to[0]),y:x.sy(b.to[1])})),T=o(()=>b.color??`var(--dl-heading)`);return(t,n)=>(r(),a(`g`,{class:`dl-line`,style:e({opacity:b.opacity})},[b.arrow?(r(),a(`defs`,u,[i(`marker`,{id:S,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{d:`M0,0 L7,3.5 L0,7 Z`,fill:T.value},null,8,d)])])):s(`v-if`,!0),i(`line`,{x1:C.value.x,y1:C.value.y,x2:w.value.x,y2:w.value.y,stroke:T.value,"stroke-width":b.width,"stroke-dasharray":b.dashed?`6 5`:void 0,"marker-end":b.arrow?`url(#${S})`:void 0,"stroke-linecap":`round`},null,8,f)],4))}});export{p as t};
|
lecture-02/assets/PlotPoints-BmurSwXE.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{Ct as e,E as t,H as n,J as r,U as i,V as a,W as o,_ as s,_t as c,b as l,bt as u,ft as d,g as f,j as p,m,wt as h,xt as g,y as _}from"./modules/shiki-ZbpftOCw.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y}from"./slidev/context-Dg_28hwb.js";var b=Symbol(`dl-plot`);function x(){let e=p(b,null);if(!e)throw Error(`This component must be used inside a <Plot2D>`);return e}function S(e,t,n=6){if(!Number.isFinite(e)||!Number.isFinite(t)||e===t)return[e];let r=(t-e)/Math.max(n,1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a>=5?10:a>=2?5:a>=1?2:1)*i,s=[],c=Math.ceil(e/o)*o;for(let e=c;e<=t+o*1e-9;e+=o)s.push(Math.abs(e)<o*1e-9?0:e);return s}function C(e){if(e===0)return`0`;let t=Math.abs(e);return t>=1e5||t<1e-4?e.toExponential(0):String(Number(e.toFixed(6)))}var w=[`viewBox`],T={key:0,class:`dl-plot__grid`},E=[`x1`,`x2`,`y1`,`y2`],ee=[`x1`,`x2`,`y1`,`y2`],te={class:`dl-plot__axes`},D=[`x1`,`x2`,`y1`,`y2`],O=[`x1`,`x2`,`y1`,`y2`],k={class:`dl-plot__ticks`},A=[`x1`,`x2`,`y1`,`y2`],j=[`x`,`y`],M=[`x1`,`x2`,`y1`,`y2`],N=[`x`,`y`],P=[`x`,`y`,`width`,`height`],F=[`clip-path`],I=[`x`,`y`],L=[`x`],R=v(t({__name:`Plot2D`,props:{xDomain:{default:()=>[0,1]},yDomain:{default:()=>[0,1]},width:{default:520},height:{default:320},xLabel:{},yLabel:{},xTicks:{default:6},yTicks:{default:5},grid:{type:Boolean,default:!0},originAxes:{type:Boolean,default:!1},padding:{}},setup(e,{expose:t}){let{$slidev:p,$nav:g,$clicksContext:v,$clicks:x,$page:R,$renderContext:z,$frontmatter:B}=y(),V=e,H=f(()=>({top:V.padding?.top??14,right:V.padding?.right??16,bottom:V.padding?.bottom??(V.xLabel?42:28),left:V.padding?.left??(V.yLabel?52:40)})),U=f(()=>({x:H.value.left,y:H.value.top,width:Math.max(V.width-H.value.left-H.value.right,1),height:Math.max(V.height-H.value.top-H.value.bottom,1)})),W=e=>{let[t,n]=V.xDomain;return U.value.x+(e-t)/(n-t||1)*U.value.width},G=e=>{let[t,n]=V.yDomain;return U.value.y+(1-(e-t)/(n-t||1))*U.value.height},K=e=>{let[t,n]=V.xDomain;return t+(e-U.value.x)/U.value.width*(n-t)},q=e=>{let[t,n]=V.yDomain;return t+(1-(e-U.value.y)/U.value.height)*(n-t)};n(b,{sx:W,sy:G,ix:K,iy:q,xDomain:c(V,`xDomain`),yDomain:c(V,`yDomain`),inner:U});let J=f(()=>Array.isArray(V.xTicks)?V.xTicks:S(V.xDomain[0],V.xDomain[1],V.xTicks)),Y=f(()=>Array.isArray(V.yTicks)?V.yTicks:S(V.yDomain[0],V.yDomain[1],V.yTicks)),X=f(()=>V.originAxes?G(Math.min(Math.max(0,V.yDomain[0]),V.yDomain[1])):U.value.y+U.value.height),Z=f(()=>V.originAxes?W(Math.min(Math.max(0,V.xDomain[0]),V.xDomain[1])):U.value.x),Q=d(null),$=`dl-plot-clip-${r()}`;function ne(e){let t=Q.value;if(!t)return null;let n=t.getBoundingClientRect(),r=(e.clientX-n.left)/n.width*V.width,i=(e.clientY-n.top)/n.height*V.height;return{x:K(r),y:q(i)}}return t({dataAt:ne,sx:W,sy:G,ix:K,iy:q}),(e,t)=>(a(),l(`svg`,{ref_key:`svg`,ref:Q,class:`dl-plot`,viewBox:`0 0 ${V.width} ${V.height}`,preserveAspectRatio:`xMidYMid meet`,role:`img`},[V.grid?(a(),l(`g`,T,[(a(!0),l(m,null,i(J.value,e=>(a(),l(`line`,{key:`gx${e}`,x1:W(e),x2:W(e),y1:U.value.y,y2:U.value.y+U.value.height},null,8,E))),128)),(a(!0),l(m,null,i(Y.value,e=>(a(),l(`line`,{key:`gy${e}`,x1:U.value.x,x2:U.value.x+U.value.width,y1:G(e),y2:G(e)},null,8,ee))),128))])):_(`v-if`,!0),s(`g`,te,[s(`line`,{x1:U.value.x,x2:U.value.x+U.value.width,y1:X.value,y2:X.value},null,8,D),s(`line`,{x1:Z.value,x2:Z.value,y1:U.value.y,y2:U.value.y+U.value.height},null,8,O)]),_(`
|
| 2 |
+
Tick *marks* sit on the axis, which may run through the origin; tick
|
| 3 |
+
*labels* always sit on the frame edge. Letting labels follow a
|
| 4 |
+
through-origin axis buries them in the middle of the data and collides the
|
| 5 |
+
two zeros on top of each other.
|
| 6 |
+
`),s(`g`,k,[(a(!0),l(m,null,i(J.value,e=>(a(),l(m,{key:`tx${e}`},[s(`line`,{x1:W(e),x2:W(e),y1:X.value,y2:X.value+5},null,8,A),s(`text`,{x:W(e),y:U.value.y+U.value.height+17,"text-anchor":`middle`},h(u(C)(e)),9,j)],64))),128)),(a(!0),l(m,null,i(Y.value,e=>(a(),l(m,{key:`ty${e}`},[s(`line`,{x1:Z.value-5,x2:Z.value,y1:G(e),y2:G(e)},null,8,M),s(`text`,{x:U.value.x-9,y:G(e)+4,"text-anchor":`end`},h(u(C)(e)),9,N)],64))),128))]),_(`
|
| 7 |
+
Marks are clipped to the plot area. A decision boundary or a diverging
|
| 8 |
+
trajectory legitimately runs off the domain, and without this it paints
|
| 9 |
+
straight across the rest of the slide.
|
| 10 |
+
`),s(`defs`,null,[s(`clipPath`,{id:$},[s(`rect`,{x:U.value.x,y:U.value.y,width:U.value.width,height:U.value.height},null,8,P)])]),s(`g`,{"clip-path":`url(#${$})`},[o(e.$slots,`default`,{},void 0,!0)],8,F),_(` Annotations that are allowed to sit outside the axes. `),o(e.$slots,`overlay`,{},void 0,!0),V.xLabel?(a(),l(`text`,{key:1,class:`dl-plot__label`,x:U.value.x+U.value.width/2,y:V.height-6,"text-anchor":`middle`},h(V.xLabel),9,I)):_(`v-if`,!0),V.yLabel?(a(),l(`text`,{key:2,class:`dl-plot__label`,x:-(U.value.y+U.value.height/2),y:13,"text-anchor":`middle`,transform:`rotate(-90)`},h(V.yLabel),9,L)):_(`v-if`,!0)],8,w))}}),[[`__scopeId`,`data-v-515e2759`]]),z={class:`dl-points`},B=[`cx`,`cy`,`r`,`fill`],V=[`d`,`fill`],H=[`x`,`y`],U=v(t({__name:`PlotPoints`,props:{points:{},radius:{default:5},color:{},colors:{},shapes:{},opacity:{default:1}},setup(t){let{$slidev:n,$nav:r,$clicksContext:o,$clicks:c,$page:u,$renderContext:d,$frontmatter:p}=y(),v=t,b=x(),S=f(()=>v.points.map((e,t)=>{let n=String(e.cls??``);return{i:t,cx:b.sx(e.x),cy:b.sy(e.y),shape:v.shapes?.[n]??`circle`,fill:v.colors?.[n]??v.color??`var(--dl-accent)`,highlight:!!e.highlight,label:e.label}}));function C(e,t,n){let r=n*.9;return`M${e-r},${t-r} h${r*2} v${r*2} h${-r*2} Z`}function w(e,t,n){let r=n*1.2;return`M${e},${t-r} L${e+r},${t+r*.8} L${e-r},${t+r*.8} Z`}return(t,n)=>(a(),l(m,null,[_('\n Opacity goes through `style`, never the SVG `opacity` attribute. UnoCSS\n attributify scans source text, so a literal `opacity="0.85"` anywhere in the\n project emits `[opacity~="0.85"]{opacity:0.0085}` — and that CSS rule beats\n the presentation attribute, silently rendering marks all but invisible.\n '),s(`g`,z,[(a(!0),l(m,null,i(S.value,t=>(a(),l(`g`,{key:t.i,style:e({opacity:v.opacity})},[t.shape===`circle`?(a(),l(`circle`,{key:0,cx:t.cx,cy:t.cy,r:v.radius,fill:t.fill,class:g({"is-highlight":t.highlight})},null,10,B)):(a(),l(`path`,{key:1,d:t.shape===`square`?C(t.cx,t.cy,v.radius):w(t.cx,t.cy,v.radius),fill:t.fill,class:g({"is-highlight":t.highlight})},null,10,V)),t.label?(a(),l(`text`,{key:2,x:t.cx+v.radius+4,y:t.cy+4},h(t.label),9,H)):_(`v-if`,!0)],4))),128))])],2112))}}),[[`__scopeId`,`data-v-c681d555`]]);export{R as n,x as r,U as t};
|
lecture-02/assets/SlideWrapper-DBNQYNtZ.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.slidev-slide-container[data-v-0167a76e]{width:100%;height:100%;position:relative;overflow:hidden}.slidev-slide-content[data-v-0167a76e]{--slidev-slide-container-scale:var(--slidev-slide-scale);transform:translate(-50%, -50%) scale(var(--slidev-slide-scale));--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));position:absolute;top:50%;left:50%;overflow:hidden}.dark .slidev-slide-content[data-v-0167a76e]{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.dl-report[data-v-6b2267dc]{z-index:10;letter-spacing:.04em;color:var(--dl-muted);opacity:.55;font-size:.6rem;text-decoration:none;transition:opacity .15s,color .15s;position:absolute;bottom:.2rem;right:3rem}.dl-report[data-v-6b2267dc]:hover,.dl-report[data-v-6b2267dc]:focus-visible{opacity:1;color:var(--dl-accent);text-decoration:underline}.disable-view-transition[data-v-a7136532] *{view-transition-name:none!important}.slidev-page[data-v-a7136532]{--slidev-slide-zoom-scale:1;width:calc(100% / var(--slidev-slide-zoom-scale));height:calc(100% / var(--slidev-slide-zoom-scale));transform-origin:0 0;scale:var(--slidev-slide-zoom-scale);--slidev-slide-scale:calc(var(--slidev-slide-container-scale) * var(--slidev-slide-zoom-scale));position:absolute;inset:0}
|
lecture-02/assets/SlideWrapper-G9Z9lRKG.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{$ as e,B as t,Ct as n,E as r,Q as i,V as a,W as o,_ as s,_t as c,b as l,bt as u,et as ee,f as d,ft as f,g as p,i as m,k as h,m as te,q as g,ut as _,v,w as y,xt as b,y as x,z as ne}from"./modules/shiki-ZbpftOCw.js";import{A as S,Q as C,X as w,Z as T,t as E,tt as D,z as O}from"./useNav-B4RPIq_K.js";import{t as k}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{N as A,p as re}from"./modules/vue-DZSojjrY.js";import{_ as ie,d as j,f as M,g as N,h as P,m as F,n as I,p as L,v as R}from"./slidev/context-Dg_28hwb.js";import{n as z,r as B,t as V}from"./syncState-DVdyrqvA.js";import{a as H,p as U}from"./index-DA2poVkj.js";import"./slidev/client-DYM4e_rl.js";import{t as W}from"./useDrawings-BsCw7kxF.js";var G=[`innerHTML`],K=r({__name:`DrawingPreview`,props:{page:{}},setup(e){let{drawingState:t}=W();return(n,r)=>u(t)[e.page]?(a(),l(`svg`,{key:0,class:`w-full h-full absolute top-0 pointer-events-none`,innerHTML:u(t)[e.page]},null,8,G)):x(`v-if`,!0)}}),q=_({}),J=[],Y=[];z(q,`$syncUp`,!0),z(q,`$syncDown`,!0),z(q,`$paused`,!1),z(q,`$onSet`,e=>J.push(e)),z(q,`$onPatch`,e=>Y.push(e)),B(),z(q,`$patch`,async()=>!1);var ae=V(q,q,!0),X=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];X&&Number(X);var Z=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];Z&&Number(Z);var oe=new class{_screenshotSession=null;getSnapshot(e,t){let n=e+(t?`-dark`:`-light`),r=ae.state[n];if(!r)return;let i=O(e);if(i&&r?.revision===i?.meta.slide.revision)return r.image}async saveSnapshot(e,t,n){return!1}async startCapturing(e){return!1}},se=[`id`],ce=[`id`],le={class:`slidev-slide-container w-full h-full relative`},ue=[`src`],Q=f(null),de=k(r({__name:`SlideContainer`,props:{width:{type:Number},meta:{default:()=>({})},isMain:{type:Boolean,default:!1},no:{type:Number,required:!1},useSnapshot:{type:Boolean,default:!1},contentStyle:{type:Object,default:()=>({})}},setup(r){let c=r,{isPrintMode:u}=E(),d=f(null),h=re(d),g=f(null),_=p(()=>c.width??h.width.value),v=p(()=>c.width?c.width/w.value:h.height.value),y=p(()=>S.value&&!u.value?+S.value:Math.min(_.value/C.value,v.value/T.value)),b=p(()=>({...c.contentStyle,height:`${T.value}px`,width:`${C.value}px`,"--slidev-slide-scale":y.value})),D=p(()=>c.width?{width:`${c.width}px`,height:`${c.width/w.value}px`}:{});if(c.isMain){let n=document.documentElement.style;e(()=>n.setProperty(`--slidev-slide-scale`,y.value.toString())),t(()=>n.removeProperty(`--slidev-slide-scale`))}A(ie,y),A(N,g),ee(()=>{c.isMain&&(Q.value=g.value)}),ne(()=>{i(()=>c.isMain&&y.value,()=>{m()})});let O=p(()=>{if(!(c.no==null||!c.useSnapshot))return oe.getSnapshot(c.no,U.value)});return(e,t)=>O.value?(a(),l(te,{key:1},[x(` Image Snapshot `),s(`div`,le,[s(`img`,{src:O.value,class:`w-full h-full object-cover`,style:n(D.value)},null,12,ue),t[0]||=s(`div`,{absolute:``,"bottom-1":``,"right-1":``,"p0.5":``,"text-cyan:75":``,"bg-cyan:10":``,rounded:``,title:`Snapshot`},[s(`div`,{class:`i-carbon-camera`})],-1)])],2112)):(a(),l(`div`,{key:0,id:r.isMain?`slide-container`:void 0,ref_key:`container`,ref:d,class:`slidev-slide-container`,style:n(D.value)},[s(`div`,{id:r.isMain?`slide-content`:void 0,ref_key:`slideElement`,ref:g,class:`slidev-slide-content`,style:n(b.value)},[o(e.$slots,`default`,{},void 0,!0)],12,ce),o(e.$slots,`controls`,{},void 0,!0)],12,se))}}),[[`__scopeId`,`data-v-0167a76e`]]),fe=Object.assign({}),pe=Object.assign({}),me=Object.assign({}),he=Object.assign({}),ge=Object.assign({}),_e=Object.assign({}),ve={course:{code:`PGR207`,year:2026,title:`Deep Learning`,instructor:`Vajira Thambawita (PhD)`,email:`vajira@simula.no`},space:`DeepLearning-VT/DeepLearning_2026`,repo:`vlbthambawita/DeepLearning`,decks:[{id:`lecture-01`,title:`Introduction to Deep Learning`,subtitle:`Course overview, what deep learning is, and where it is used`,week:1,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025- Lecture 01.pdf`},{id:`lecture-02`,title:`Basics of Neural Networks`,subtitle:`Artificial neurons, the perceptron, Adaline and gradient descent`,week:2,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 02 .pdf`},{id:`lecture-03`,title:`PyTorch for Deep Learning`,subtitle:`Tensors, autograd, and a fully-connected network on MNIST`,week:3,published:!0,notebook:null,source:null},{id:`lecture-04`,title:`Deep Convolutional Neural Networks`,subtitle:`Locality and weight sharing, the convolution operation, and CNNs in PyTorch`,week:4,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 03.pdf`},{id:`lecture-05`,title:`Recurrent Neural Networks`,subtitle:`Sequence data, the recurrent layer, LSTM and GRU, and an RNN in PyTorch`,week:6,published:!0,publicNotes:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 5_6.pdf`},{id:`lecture-06`,title:`Transformers`,subtitle:`Query, key and value; the original architecture, and what modern transformers changed`,week:7,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 5_6.pdf`},{id:`lecture-07`,title:`Generative Models and GANs`,subtitle:`Autoencoders, VAEs, the adversarial game — and how diffusion took over`,week:9,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 07.pdf`}]},ye=[`href`],be=Object.assign({"../../../../../packages/slidev-theme-dl2026/slide-top.vue":k(r({__name:`slide-top`,setup(e){let{$slidev:t,$page:n,$renderContext:r}=I(),i=p(()=>r.value===`slide`&&!t.nav.isPrintMode),o=p(()=>t.themeConfigs?.lecture??``),s=p(()=>t.themeConfigs?.lectureTitle??``),c=p(()=>{let e=n.value,t=`[${o.value?`Lecture ${o.value}, slide ${e}`:`Slide ${e}`}] `,r=[`**Lecture:** ${o.value}${s.value?` — ${s.value}`:``}`,`**Slide:** ${e}`,`**Link:** ${typeof window<`u`?`${window.location.origin}${window.location.pathname}#/${e}`:``}`,``,`**What is wrong?**`,`<!-- e.g. typo, wrong equation, broken figure, unclear explanation -->`,``].join(`
|
| 2 |
+
`),i=new URLSearchParams({title:t,body:r,labels:`slides`});return`https://github.com/${ve.repo}/issues/new?${i}`});return(e,t)=>i.value?(a(),l(`a`,{key:0,class:`dl-report`,href:c.value,target:`_blank`,rel:`noopener`,title:`Report a problem with this slide on GitHub`,onClick:t[0]||=d(()=>{},[`stop`])},`Report issue`,8,ye)):x(`v-if`,!0)}}),[[`__scopeId`,`data-v-6b2267dc`]])}),xe=Object.assign({}),Se=Object.assign({}),Ce=Object.assign({}),we=Object.assign({}),Te=Object.assign({}),Ee=[Object.values(fe)[0],Object.values(pe)[0],Object.values(me)[0]].filter(Boolean),De={render:()=>Ee.map(e=>h(e))},$=[Object.values(he)[0],Object.values(ge)[0],Object.values(_e)[0]].filter(Boolean),Oe={render:()=>$.map(e=>h(e))},ke=[Object.values(be)[0],Object.values(xe)[0],Object.values(Se)[0]].filter(Boolean),Ae={render:()=>ke.map(e=>h(e))},je=[Object.values(Ce)[0],Object.values(we)[0],Object.values(Te)[0]].filter(Boolean),Me={render:()=>je.map(e=>h(e))},Ne=[`data-slidev-no`,`lang`],Pe=k(r({__name:`SlideWrapper`,props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:`slide`},route:{type:Object,required:!0}},setup(e){let t=e,r=p(()=>t.route.meta?.slide?.frontmatter.zoom??1);A(P,t.route),A(L,t.route.meta.slide.frontmatter),A(M,f(t.route.no)),A(F,f(t.renderContext)),A(j,c(t,`clicksContext`)),A(R,r);let i=p(()=>({"user-select":D.selectable?void 0:`none`,"--slidev-slide-zoom-scale":r.value===1?void 0:r.value}));return(r,o)=>(a(),l(`div`,{"data-slidev-no":t.route.no,class:b(u(H)(e.route,[`slide`,`presenter`].includes(t.renderContext)?``:`disable-view-transition`)),style:n(i.value),lang:t.route.meta.slide.frontmatter.lang},[y(u(Me)),(a(),v(g(t.route.component))),y(u(Ae))],14,Ne))}}),[[`__scopeId`,`data-v-a7136532`]]);export{Q as a,de as i,Oe as n,K as o,De as r,Pe as t};
|
lecture-02/assets/Slider-BO0rW71G.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-slider[data-v-b8762282]{color:var(--dl-body);grid-template-columns:1fr auto;align-items:center;gap:.15rem .6rem;font-size:.82rem;display:grid}.dl-slider.is-disabled[data-v-b8762282]{opacity:.45}.dl-slider__label[data-v-b8762282]{grid-column:1}.dl-slider__value[data-v-b8762282]{text-align:right;font-variant-numeric:tabular-nums;min-width:3.6rem;color:var(--dl-accent);grid-area:1/2/span 2;align-self:center;font-weight:600}.dl-slider__unit[data-v-b8762282]{color:var(--dl-muted);margin-left:.1rem;font-weight:400}.dl-slider input[data-v-b8762282]{width:100%;accent-color:var(--dl-accent);cursor:pointer;grid-column:1}.dl-slider input[data-v-b8762282]:disabled{cursor:not-allowed}
|
lecture-02/assets/Slider-rBweDD_5.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,N as n,V as r,Y as i,_ as a,b as o,g as s,l as c,nt as l,wt as u,xt as d,y as f}from"./modules/shiki-ZbpftOCw.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m}from"./slidev/context-Dg_28hwb.js";var h={key:0,class:`dl-slider__label`},g=[`min`,`max`,`step`,`disabled`],_={class:`dl-slider__value`},v={key:0,class:`dl-slider__unit`},y=p(t({__name:`Slider`,props:n({label:{},min:{default:0},max:{default:1},step:{default:.01},precision:{default:2},unit:{},format:{},disabled:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(t){let{$slidev:n,$nav:p,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=m(),w=t,T=i(t,`modelValue`),E=s(()=>w.format?w.format(T.value):T.value.toFixed(w.precision)),D=new Set([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`,` `]);function O(e){D.has(e.key)&&e.stopPropagation()}return(t,n)=>(r(),o(`label`,{class:d([`dl-slider`,{"is-disabled":w.disabled}])},[w.label?(r(),o(`span`,h,u(w.label),1)):f(`v-if`,!0),l(a(`input`,{"onUpdate:modelValue":n[0]||=e=>T.value=e,type:`range`,min:w.min,max:w.max,step:w.step,disabled:w.disabled,onKeydown:O},null,40,g),[[c,T.value,void 0,{number:!0}]]),a(`output`,_,[e(u(E.value),1),w.unit?(r(),o(`span`,v,u(w.unit),1)):f(`v-if`,!0)])],2))}}),[[`__scopeId`,`data-v-b8762282`]]);export{y as t};
|
lecture-02/assets/StepButton-DiDduF86.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,V as n,b as r,wt as i,xt as a,y as o}from"./modules/shiki-ZbpftOCw.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-Dg_28hwb.js";var l=[`disabled`],u={key:0,class:`dl-btn__glyph`,"aria-hidden":`true`},d=s(t({__name:`StepButton`,props:{label:{},variant:{default:`primary`},disabled:{type:Boolean,default:!1},glyph:{}},emits:[`click`],setup(t,{emit:s}){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=c(),v=t,y=s;return(t,s)=>(n(),r(`button`,{type:`button`,class:a([`dl-btn`,`is-${v.variant}`]),disabled:v.disabled,onClick:s[0]||=e=>y(`click`)},[v.glyph?(n(),r(`span`,u,i(v.glyph),1)):o(`v-if`,!0),e(` `+i(v.label),1)],10,l))}}),[[`__scopeId`,`data-v-f82500e8`]]);export{d as t};
|
lecture-02/assets/default-C3zMja2v.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{V as e,W as t,b as n,w as r}from"./modules/shiki-ZbpftOCw.js";import{t as i}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as a}from"./slidev/context-Dg_28hwb.js";import{t as o}from"./DeckFooter-6-dHlE3F.js";var s={class:`slidev-layout dl-default`},c=i({__name:`default`,setup(i){let{$slidev:c,$nav:l,$clicksContext:u,$clicks:d,$page:f,$renderContext:p,$frontmatter:m}=a();return(i,a)=>{let c=o;return e(),n(`div`,s,[t(i.$slots,`default`,{},void 0,!0),r(c)])}}},[[`__scopeId`,`data-v-3f3da7ce`]]);export{c as t};
|
lecture-02/assets/index-BUWRHKMm.css
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
lecture-02/assets/index-DA2poVkj.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./modules/file-saver-BpWusTEB.js","./rolldown-runtime-hePW80VL.js","./slidev/entry-D6J4lPyB.js","./modules/shiki-ZbpftOCw.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./entry-Dba4BKje.css","./slidev/overview-BfXSNxbX.js","./useNav-B4RPIq_K.js","./modules/vue-DZSojjrY.js","./slidev/context-Dg_28hwb.js","./modules/unplugin-icons-DgelL-FV.js","./slidev/IconButton-QKGv662x.js","./slidev/NoteDisplay-C_nDpk9u.js","./NoteDisplay-DCBzjb4F.css","./SlideWrapper-G9Z9lRKG.js","./syncState-DVdyrqvA.js","./slidev/client-DYM4e_rl.js","./useDrawings-BsCw7kxF.js","./SlideWrapper-DBNQYNtZ.css","./slidev/NoteEditable-BWcIiqnF.js","./overview-BIQ10iVu.css","./slidev/notes-DeLJKKZm.js","./slidev/Modal-BJ4Di9--.js","./slidev/TimerBar-DBLJKlGO.js","./slidev/notes-edit-DaTWDoRv.js","./slidev/presenter-CBeEHWD8.js","./slidev/DrawingControls-C5oFoiZ_.js","./slidev/VerticalDivider-B_5phnjk.js","./DrawingControls-Dhbx0szf.css","./slidev/shortcuts-CpiQEXad.js","./shortcuts-nRB69a7e.css","./presenter-J5ibmAMh.css","./slidev/play-bwjAMvBL.js","./play-D_7yfuao.css","./slidev/404-OLfNBXtf.js","./404-bkedjYjP.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{r as e}from"./rolldown-runtime-hePW80VL.js";import{$ as t,A as n,D as r,E as i,G as a,I as o,L as s,Q as c,R as l,V as u,at as d,b as f,bt as p,ft as m,g as h,ht as g,j as _,m as v,s as y,st as b,t as x,ut as S,w as C,y as w,yt as T}from"./modules/shiki-ZbpftOCw.js";import{$ as E,A as ee,B as te,G as ne,H as re,Q as D,R as ie,Z as ae,c as oe,et as O,h as se,j as k,l as ce,n as le,p as A,q as j,t as ue,tt as M,w as de,z as fe}from"./useNav-B4RPIq_K.js";import{A as pe,L as me,R as he,S as ge,T as _e,V as ve,f as ye,g as be,i as xe,j as Se,o as Ce,x as we,z as Te}from"./modules/vue-DZSojjrY.js";import{a as Ee,c as De,d as Oe,f as ke,g as Ae,i as je,m as Me,o as Ne,p as Pe,r as Fe,s as Ie,u as Le,y as Re}from"./slidev/context-Dg_28hwb.js";import{n as N,r as ze,t as Be}from"./syncState-DVdyrqvA.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),m(!1),m(!1);var Ve=new Set([`link`,`style`,`script`,`noscript`]),He=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),Ue=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),We=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),Ge=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),Ke=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),qe=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),Je=new Set([`theme-color`,`google-site-verification`,`author`,`og:locale:alternate`,`og:image`,`og:video`,`og:audio`,`article:author`,`article:tag`,`book:author`,`book:tag`,`twitter:image`]),Ye={critical:-8,high:-1,low:2},Xe=e=>typeof e==`number`?Number.isFinite(e):e;function Ze(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Qe(e,t,n,r){for(let i=n;i<e.length;i+=1)try{let n=r?r.run(()=>e[i](...t)):e[i](...t);if(n&&typeof n.then==`function`)return Promise.resolve(n).then(()=>Qe(e,t,i+1,r))}catch(e){return Promise.reject(e)}}var $e=class{_hooks;constructor(){this._hooks={}}hook(e,t){return!e||typeof t!=`function`?()=>{}:(this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)})}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}callHook(e,...t){let n=this._hooks[e];if(!(!n||n.length===0))return Qe(n,t,0)}};function et(e){let t=new $e;for(let n in e||{})t.hook(n,e[n]);return t}function tt(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var nt=/^(?:viewport|description|keywords|robots)$/,rt=[`name`,`property`,`http-equiv`];function it(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.slice(t+1);return Je.has(n)||n.startsWith(`og:image:`)||n.startsWith(`og:video:`)||n.startsWith(`og:audio:`)||n.startsWith(`twitter:image:`)}function at(e){let{props:t,tag:n,key:r}=e;if(Ge.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of rt){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!nt.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:He.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function ot(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function st(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n<r.length;n++){let i=st(r[n],t);e?e[n]=i:i!==r[n]&&(e=r.slice(0,n),e[n]=i)}return e||r}if(r?.constructor===Object){let e;for(let n in r){let i=Ze(n),a=i?void 0:st(r[n],t,n);if(!e&&(i||a!==r[n])){e={};for(let t in r){if(t===n)break;e[t]=r[t]}}e&&!i&&(e[n]=a)}return e||r}return r}var ct=/[\s"'<>/=\x00-\x1F\x7F]/;function lt(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e){if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}else e.split(` `).forEach(e=>e&&r.add(e))}};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function ut(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=Ue.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(Ze(r))continue;let i=r.startsWith(`data-`),a=n&&!Ke.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||ct.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=lt(r,s);else if(Ke.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=t.type=n,e[r]=JSON.stringify(s))}else e[r]=s}else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function dt(e,t){let n;return t.length&&(n=(e,n)=>{for(let r=0;r<t.length;r++)n=t[r](e,n);return n},e=n(void 0,e)),st(e,n)}function ft(e,t){let n=ut({tag:e,props:{}},typeof t==`object`&&typeof t!=`function`?t:{[e===`script`||e===`noscript`||e===`style`?`innerHTML`:`textContent`]:t});if(n.key&&Ve.has(n.tag)&&(n.props[`data-hid`]=n._h=n.key),n.tag===`script`&&typeof n.innerHTML==`object`&&(n.innerHTML=JSON.stringify(n.innerHTML),n.props.type=n.props.type||`application/json`),Array.isArray(n.props.content)){let e=[];for(let t of n.props.content)e.push({...n,props:{...n.props,content:t}});return e}return n}function pt(e,t){if(Array.isArray(t))for(let n of t)e.push(n);else e.push(t)}function mt(e,t){if(!e)return[];typeof e==`function`&&(e=e()),e=dt(e,t);let n=[];for(let t in e){let r=e[t];if(r!==void 0){if(Array.isArray(r))for(let e of r)pt(n,ft(t,e));else pt(n,ft(t,r))}}return n}var ht=/</g,gt=/<\/script/g,_t=(e,t)=>e._w===t._w?e._p-t._p:e._w-t._w,vt=()=>100;function yt(e){for(let t in e)return!1;return!0}var bt=/^tags:|:render/;function xt(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function St(e){for(let t=0;t<e.length;t++){let n=e[t],r={...n.props};r.class instanceof Set&&(r.class=new Set(r.class)),r.style instanceof Map&&(r.style=new Map(r.style)),e[t]={...n,props:r}}}function Ct(e,t){let n=e.tags,r=0;for(let t of e.tagMap.values())if(Array.isArray(t))for(let e of t)n[r++]=e;else n[r++]=t;n.length=r,t&&n.sort(_t)}function wt(e){let t=!1;for(let n of e.tags.sort(_t)){let r=n._d||ot(n);if(!r)continue;let i=e.tagMap.get(r);if(!i){e.tagMap.set(r,n);continue}if((n.tagDuplicateStrategy||(qe.has(n.tag)?`merge`:null)||(n.key&&n.key===i.key?`merge`:null))===`merge`){let t={...i.props};for(let e in n.props)t[e]=e===`style`?new Map([...i.props.style||new Map,...n.props[e]]):e===`class`?new Set([...i.props.class||[],...n.props[e]]):n.props[e];e.tagMap.set(r,{...n,props:t})}else n._p>>10==i._p>>10&&n.tag===`meta`&&it(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._w<i._w)&&e.tagMap.set(r,n)}return t}function Tt(e,t){let n=e.tagMap.get(`title`),r=e.tagMap.get(`titleTemplate`);if(t._title=n?.textContent,!r)return;let i=r.textContent;if(t._titleTemplate=i,!i)return;let a=typeof i==`function`?i(n?.textContent):i;typeof a==`string`&&!t.plugins.has(`template-params`)&&(a=a.replace(`%s`,n?.textContent||``)),n?a===null?e.tagMap.delete(`title`):e.tagMap.set(`title`,{...n,textContent:a}):e.tagMap.set(`titleTemplate`,{...r,tag:`title`,textContent:a})}function Et(e){let t=0;for(let n of e){let{innerHTML:r,tag:i,props:a}=n;if(!(!We.has(i)||yt(a)&&!Xe(r)&&!Xe(n.textContent))&&!(i===`meta`&&!Xe(a.content)&&!a[`http-equiv`]&&!a.charset)){if(i===`script`&&(r||n.textContent)){let e=String(a.type),t=e.endsWith(`json`)||e===`importmap`||e===`speculationrules`,i=e=>t?(typeof e==`string`?e:JSON.stringify(e)).replace(ht,`\\u003C`):typeof e==`string`?e.replace(gt,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&(n.textContent=i(n.textContent)),n._d=at(n)}e[t++]=n}}return e.length=t,e}function Dt(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??vt,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};xt(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&tt(e,`entries:resolve`,{entries:a,...r})),xt(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a){if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||yt(t.options)))a=t._precomputedTags;else{if(a=mt(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!yt(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};tt(e,`entries:normalize`,n),a=n.tags}for(let e=0;e<a.length;e++){let r=a[e];r._w=n(r),r._p=(t._i<<10)+e,r._d=at(r),r._d||(r._h=ot(r))}t._tags=a}}r.tags.push(...a)}for(let e in i)if(i[e]?.length&&bt.test(e)){St(r.tags);break}let o=wt(r);return Tt(r,e),Ct(r,o),tt(e,`tags:beforeResolve`,r),tt(e,`tags:resolve`,r),tt(e,`tags:afterResolve`,r),Et(r.tags)}var Ot=`usehead`;function kt(){if(n()){let e=_(Ot);if(e)return e}throw Error(`useHead() was called without provide context, ensure you call it through the setup() function.`)}function At(e){return{install(t){t.config.globalProperties.$unhead=e,t.config.globalProperties.$head=e,t.provide(Ot,e)}}.install}var jt=Object.assign((e,t)=>b(t)?T(t):t,{_static:!0});function Mt(e,t={}){let n=t.head||kt();return n.ssr?n.push(e||{},t):Nt(n,e,t)}function Nt(e,n,i={}){let a=d();if(a&&!a.active)return{patch(){},dispose(){},_i:-1};let c=m(!1);if(i.onRendered&&a){let e=i.onRendered;i={...i,onRendered:t=>a.run(()=>e(t))}}let u;return t(()=>{let t=c.value?{}:st(n,jt);u?u.patch(t):u=e.push(t,i)}),r()&&(s(()=>{u.dispose()}),l(()=>{c.value=!0}),o(()=>{c.value=!1})),u}function Pt(e,t){if(typeof t==`function`&&t.key&&e.plugins.has(t.key))return;let n=typeof t==`function`?t(e):t,r=n.key||String(e.plugins.size+1);if(!e.plugins.get(r)){e.plugins.set(r,n);for(let t in n.hooks||{})e.hooks?.hook(t,n.hooks[t])}}function Ft(e,t={}){let n=!t.document,r=new Map,i={_entryCount:1,_h:0,plugins:new Map,resolvedOptions:t,ssr:n,entries:r,hooks:void 0,render:()=>e(i),use:e=>Pt(i,e),push(e,t){let a=t?._index??i._entryCount++,o=t?{...t}:{};delete o.head,delete o.onRendered,delete o._index;let s={_i:a,input:e,options:o};return r.set(a,s),{_i:a,dispose(){r.delete(a)},patch(e){n?(s.input=e,delete s._tags):s._pending=e,r.has(a)||r.set(a,s)}}}};return t.init?.forEach(e=>e&&i.push(e)),i}var It=Object.assign({}),Lt=Object.assign({}),Rt=Object.assign({}),zt=[Object.values(It)[0],Object.values(Lt)[0],Object.values(Rt)[0]].filter(Boolean),Bt=we(),Vt=be(`slidev-color-schema`,`auto`),Ht=h(()=>M.colorSchema!==`auto`),Ut=h({get(){return Ht.value?M.colorSchema===`dark`:Vt.value===`auto`?Bt.value:Vt.value===`dark`},set(e){Ht.value||(Vt.value=e===Bt.value?`auto`:e?`dark`:`light`)}}),Wt=me(Ut);Se&&c(Ut,e=>{let t=window.document.createElement(`style`);t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),window.document.head.appendChild(t);let n=document.querySelector(`html`);n.classList.toggle(`dark`,e),n.classList.toggle(`light`,!e),window.getComputedStyle(t).opacity,document.head.removeChild(t)},{immediate:!0});function Gt(){let{isPrintMode:e}=ue();ge(h(()=>e.value?`
|
| 3 |
+
@page {
|
| 4 |
+
size: ${D.value}px ${ae.value}px;
|
| 5 |
+
margin: 0px;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
* {
|
| 9 |
+
transition: none !important;
|
| 10 |
+
transition-duration: 0s !important;
|
| 11 |
+
}`:``))}var Kt=Symbol.for(`yaml.alias`),qt=Symbol.for(`yaml.document`),Jt=Symbol.for(`yaml.map`),Yt=Symbol.for(`yaml.pair`),Xt=Symbol.for(`yaml.scalar`),Zt=Symbol.for(`yaml.seq`),P=Symbol.for(`yaml.node.type`),Qt=e=>!!e&&typeof e==`object`&&e[P]===Kt,$t=e=>!!e&&typeof e==`object`&&e[P]===qt,en=e=>!!e&&typeof e==`object`&&e[P]===Jt,F=e=>!!e&&typeof e==`object`&&e[P]===Yt,I=e=>!!e&&typeof e==`object`&&e[P]===Xt,tn=e=>!!e&&typeof e==`object`&&e[P]===Zt;function L(e){if(e&&typeof e==`object`)switch(e[P]){case Jt:case Zt:return!0}return!1}function R(e){if(e&&typeof e==`object`)switch(e[P]){case Kt:case Jt:case Xt:case Zt:return!0}return!1}var nn=e=>(I(e)||L(e))&&!!e.anchor,z=Symbol(`break visit`),rn=Symbol(`skip children`),an=Symbol(`remove node`);function on(e,t){let n=cn(t);$t(e)?sn(null,e.contents,n,Object.freeze([e]))===an&&(e.contents=null):sn(null,e,n,Object.freeze([]))}on.BREAK=z,on.SKIP=rn,on.REMOVE=an;function sn(e,t,n,r){let i=ln(e,t,n,r);if(R(i)||F(i))return un(e,r,i),sn(e,i,n,r);if(typeof i!=`symbol`){if(L(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=sn(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===z)return z;else i===an&&(t.items.splice(e,1),--e)}}else if(F(t)){r=Object.freeze(r.concat(t));let e=sn(`key`,t.key,n,r);if(e===z)return z;e===an&&(t.key=null);let i=sn(`value`,t.value,n,r);if(i===z)return z;i===an&&(t.value=null)}}return i}function cn(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ln(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(en(t))return n.Map?.(e,t,r);if(tn(t))return n.Seq?.(e,t,r);if(F(t))return n.Pair?.(e,t,r);if(I(t))return n.Scalar?.(e,t,r);if(Qt(t))return n.Alias?.(e,t,r)}function un(e,t,n){let r=t[t.length-1];if(L(r))r.items[e]=n;else if(F(r))e===`key`?r.key=n:r.value=n;else if($t(r))r.contents=n;else{let e=Qt(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}function dn(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function fn(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=fn(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=fn(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=fn(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=fn(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function B(e,t,n){if(Array.isArray(e))return e.map((e,t)=>B(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!nn(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var pn=class{constructor(e){Object.defineProperty(this,P,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!$t(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=B(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?fn(i,{"":o},``,o):o}},mn=class extends pn{constructor(e){super(Kt),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],on(e,{Node:(e,t)=>{(Qt(t)||nn(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(B(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=hn(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(dn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function hn(e,t,n){if(Qt(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(L(t)){let r=0;for(let i of t.items){let t=hn(e,i,n);t>r&&(r=t)}return r}if(F(t)){let r=hn(e,t.key,n),i=hn(e,t.value,n);return Math.max(r,i)}return 1}var gn=e=>!e||typeof e!=`function`&&typeof e!=`object`,V=class extends pn{constructor(e){super(Xt),this.value=e}toJSON(e,t){return t?.keep?this.value:B(this.value,e,t)}toString(){return String(this.value)}};V.BLOCK_FOLDED=`BLOCK_FOLDED`,V.BLOCK_LITERAL=`BLOCK_LITERAL`,V.PLAIN=`PLAIN`,V.QUOTE_DOUBLE=`QUOTE_DOUBLE`,V.QUOTE_SINGLE=`QUOTE_SINGLE`;var _n=`tag:yaml.org,2002:`;function vn(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function yn(e,t,n){if($t(e)&&(e=e.contents),R(e))return e;if(F(e)){let t=n.schema[Jt].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new mn(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=_n+t.slice(2));let l=vn(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new V(e);return c&&(c.node=t),t}l=e instanceof Map?o[Jt]:Symbol.iterator in Object(e)?o[Zt]:o[Jt]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new V(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function bn(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return yn(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var xn=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Sn=class extends pn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>R(t)||F(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(xn(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(L(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,bn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(L(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&I(i)?i.value:i:L(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F(t))return!1;let n=t.value;return n==null||e&&I(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return L(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(L(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,bn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Cn=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function wn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Tn=(e,t,n)=>e.endsWith(`
|
| 12 |
+
`)?wn(n,t):n.includes(`
|
| 13 |
+
`)?`
|
| 14 |
+
`+wn(n,t):(e.endsWith(` `)?``:` `)+n,En=`flow`,Dn=`block`,On=`quoted`;function kn(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;i<a&&(a=0);let c=Math.max(1+a,1+i-t.length);if(e.length<=c)return e;let l=[],u={},d=i-t.length;typeof r==`number`&&(r>i-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=An(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===`
|
| 15 |
+
`)n===`block`&&(h=An(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==`
|
| 16 |
+
`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==`
|
| 17 |
+
`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r<l.length;++r){let i=l[r],a=l[r+1]||e.length;i===0?v=`\n${t}${e.slice(0,a)}`:(n===`quoted`&&u[i]&&(v+=`${e[i]}\\`),v+=`\n${t}${e.slice(i+1,a)}`)}return v}function An(e,t,n){let r=t,i=t+1,a=e[i];for(;a===` `||a===` `;)if(t<i+n)a=e[++t];else{do a=e[++t];while(a&&a!==`
|
| 18 |
+
`);r=t,i=t+1,a=e[i]}return r}var jn=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Mn=e=>/^(%|---|\.\.\.)/m.test(e);function Nn(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;t<i;++t)if(e[t]===`
|
| 19 |
+
`){if(t-n>r)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Pn(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Mn(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length<i)e+=1;else{for(o+=n.slice(s,e)+`
|
| 20 |
+
|
| 21 |
+
`;n[e+2]===`\\`&&n[e+3]===`n`&&n[e+4]!==`"`;)o+=`
|
| 22 |
+
`,e+=2;o+=a,n[e+2]===` `&&(o+=`\\`),e+=1,s=e+1}break;default:e+=1}return o=s?o+n.slice(s):n,r?o:kn(o,a,On,jn(t,!1))}function Fn(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
| 23 |
+
`)||/[ \t]\n|\n[ \t]/.test(e))return Pn(e,t);let n=t.indent||(Mn(e)?` `:``),r=`'`+e.replace(/'/g,`''`).replace(/\n+/g,`$&\n${n}`)+`'`;return t.implicitKey?r:kn(r,n,En,jn(t,!1))}function In(e,t){let{singleQuote:n}=t.options,r;if(n===!1)r=Pn;else{let t=e.includes(`"`),i=e.includes(`'`);r=t&&!i?Fn:i&&!t?Pn:n?Fn:Pn}return r(e,t)}var Ln;try{Ln=RegExp(`(^|(?<!
|
| 24 |
+
))
|
| 25 |
+
+(?!
|
| 26 |
+
|$)`,`g`)}catch{Ln=/\n+(?!\n|$)/g}function Rn({comment:e,type:t,value:n},r,i,a){let{blockQuote:o,commentString:s,lineWidth:c}=r.options;if(!o||/\n[\t ]+$/.test(n))return In(n,r);let l=r.indent||(r.forceBlockIndent||Mn(n)?` `:``),u=o===`literal`?!0:o===`folded`||t===V.BLOCK_FOLDED?!1:t===V.BLOCK_LITERAL||!Nn(n,c,l.length);if(!n)return u?`|
|
| 27 |
+
`:`>
|
| 28 |
+
`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==`
|
| 29 |
+
`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(`
|
| 30 |
+
`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===`
|
| 31 |
+
`&&(p=p.slice(0,-1)),p.replace(Ln,`$&${l}`));let h=!1,g,_=-1;for(g=0;g<n.length;++g){let e=n[g];if(e===` `)h=!0;else if(e===`
|
| 32 |
+
`)_=g;else break}let v=n.substring(0,_<g?_+1:g);v&&=(n=n.substring(v.length),v.replace(/\n+/g,`$&${l}`));let y=(h?l?`2`:`1`:``)+d;if(e&&(y+=` `+s(e.replace(/ ?[\r\n]+/g,` `)),i&&i()),!u){let e=n.replace(/\n+/g,`
|
| 33 |
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\n+/g,`$&${l}`),i=!1,a=jn(r,!0);o!==`folded`&&t!==V.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});let s=kn(`${v}${e}${p}`,l,Dn,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function zn(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(`
|
| 34 |
+
`)||u&&/[[\]{},]/.test(a))return In(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(`
|
| 35 |
+
`)?In(a,t):Rn(e,t,n,r);if(!s&&!u&&i!==V.PLAIN&&a.includes(`
|
| 36 |
+
`))return Rn(e,t,n,r);if(Mn(a)){if(c===``)return t.forceBlockIndent=!0,Rn(e,t,n,r);if(s&&c===l)return In(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return In(a,t)}return s?d:kn(d,c,En,jn(t,!1))}function Bn(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==V.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=V.QUOTE_DOUBLE);let c=e=>{switch(e){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||a?In(o.value,t):Rn(o,t,n,r);case V.QUOTE_DOUBLE:return Pn(o.value,t);case V.QUOTE_SINGLE:return Fn(o.value,t);case V.PLAIN:return zn(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Vn(e,t){let n=Object.assign({blockQuote:!0,commentString:Cn,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Hn(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(I(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Un(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(I(e)||L(e))&&e.anchor;a&&dn(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Wn(e,t,n,r){if(F(e))return e.toString(t,n,r);if(Qt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=R(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Hn(t.doc.schema.tags,a);let o=Un(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):I(a)?Bn(a,t,n,r):a.toString(t,n,r);return o?I(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Gn({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=R(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(L(e)||!R(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||L(e)||(I(e)?e.type===V.BLOCK_FOLDED||e.type===V.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Wn(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Tn(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Tn(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Tn(g,n.indent,l(f))));let _,v,y;R(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&I(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&tn(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Wn(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?`
|
| 37 |
+
`:``,v){let e=l(v);S+=`\n${wn(e,n.indent)}`}x===``&&!n.inFlow?S===`
|
| 38 |
+
`&&y&&(S=`
|
| 39 |
+
|
| 40 |
+
`):S+=`\n${n.indent}`}else if(!p&&L(t)){let e=x[0],r=x.indexOf(`
|
| 41 |
+
`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&n<r&&x[n+1]===`!`&&(n=x.indexOf(` `,n+1)),(n===-1||r<n)&&(t=!0)}t||(S=`\n${n.indent}`)}}else(x===``||x[0]===`
|
| 42 |
+
`)&&(S=``);return g+=S+x,n.inFlow?b&&r&&r():y&&!b?g+=Tn(g,n.indent,l(y)):h&&i&&i(),g}function Kn(e,t){(e===`debug`||e===`warn`)&&console.warn(t)}var qn=`<<`,Jn={identify:e=>e===qn||typeof e==`symbol`&&e.description===qn,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new V(Symbol(qn)),{addToJSMap:Xn}),stringify:()=>qn},Yn=(e,t)=>(Jn.identify(t)||I(t)&&(!t.type||t.type===V.PLAIN)&&Jn.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Jn.tag&&e.default);function Xn(e,t,n){let r=Qn(e,n);if(tn(r))for(let n of r.items)Zn(e,t,n);else if(Array.isArray(r))for(let n of r)Zn(e,t,n);else Zn(e,t,r)}function Zn(e,t,n){let r=Qn(e,n);if(!en(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Qn(e,t){return e&&Qt(t)?t.resolve(e.doc,e):t}function $n(e,t,{key:n,value:r}){if(R(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Yn(e,n))Xn(e,t,r);else{let i=B(n,``,e);if(t instanceof Map)t.set(i,B(r,i,e));else if(t instanceof Set)t.add(i);else{let a=er(n,i,e),o=B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function er(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(R(e)&&n?.doc){let t=Vn(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Kn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function tr(e,t,n){return new H(yn(e,void 0,n),yn(t,void 0,n))}var H=class e{constructor(e,t=null){Object.defineProperty(this,P,{value:Yt}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return R(n)&&(n=n.clone(t)),R(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return $n(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Gn(this,e,t,n):JSON.stringify(this)}};function nr(e,t,n){return(t.inFlow??e.flow?ir:rr)(e,t,n)}function rr({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;e<t.length;++e){let i=t[e],o=null;if(R(i))!d&&i.spaceBefore&&f.push(``),ar(n,f,i.commentBefore,d),i.comment&&(o=i.comment);else if(F(i)){let e=R(i.key)?i.key:null;e&&(!d&&e.spaceBefore&&f.push(``),ar(n,f,e.commentBefore,d))}d=!1;let s=Wn(i,u,()=>o=null,()=>d=!0);o&&(s+=Tn(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;e<f.length;++e){let t=f[e];p+=t?`\n${c}${t}`:`
|
| 43 |
+
`}}return e?(p+=`
|
| 44 |
+
`+wn(l(e),c),s&&s()):d&&o&&o(),p}function ir({items:e},t,{flowChars:n,itemIndent:r}){let{indent:i,indentStep:a,flowCollectionPadding:o,options:{commentString:s}}=t;r+=a;let c=Object.assign({},t,{indent:r,inFlow:!0,type:null}),l=!1,u=0,d=[];for(let n=0;n<e.length;++n){let i=e[n],a=null;if(R(i))i.spaceBefore&&d.push(``),ar(t,d,i.commentBefore,!1),i.comment&&(a=i.comment);else if(F(i)){let e=R(i.key)?i.key:null;e&&(e.spaceBefore&&d.push(``),ar(t,d,e.commentBefore,!1),e.comment&&(l=!0));let n=R(i.value)?i.value:null;n?(n.comment&&(a=n.comment),n.commentBefore&&(l=!0)):i.value==null&&e?.comment&&(a=e.comment)}a&&(l=!0);let o=Wn(i,c,()=>a=null);l||=d.length>u||o.includes(`
|
| 45 |
+
`),n<e.length-1?o+=`,`:t.options.trailingComma&&(t.options.lineWidth>0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Tn(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:`
|
| 46 |
+
`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function ar({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=wn(t(r),e);n.push(i.trimStart())}}function U(e,t){let n=I(t)?t.value:t;for(let r of e)if(F(r)&&(r.key===t||r.key===n||I(r.key)&&r.key.value===n))return r}var W=class extends Sn{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Jt,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(tr(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=F(e)?e:!e||typeof e!=`object`||!(`key`in e)?new H(e,e?.value):new H(e.key,e.value);let r=U(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);I(r.value)&&gn(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=U(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=U(this.items,e)?.value;return(!t&&I(n)?n.value:n)??void 0}has(e){return!!U(this.items,e)}set(e,t){this.add(new H(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)$n(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!F(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nr(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},or={collection:`map`,default:!0,nodeClass:W,tag:`tag:yaml.org,2002:map`,resolve(e,t){return en(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>W.from(e,t,n)},sr=class extends Sn{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Zt,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=cr(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=cr(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&I(r)?r.value:r}has(e){let t=cr(e);return typeof t==`number`&&t<this.items.length}set(e,t){let n=cr(e);if(typeof n!=`number`)throw Error(`Expected a valid index, not ${e}.`);let r=this.items[n];I(r)&&gn(t)?r.value=t:this.items[n]=t}toJSON(e,t){let n=[];t?.onCreate&&t.onCreate(n);let r=0;for(let e of this.items)n.push(B(e,String(r++),t));return n}toString(e,t,n){return e?nr(this,e,{blockItemPrefix:`- `,flowChars:{start:`[`,end:`]`},itemIndent:(e.indent||``)+` `,onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if(typeof r==`function`){let n=t instanceof Set?a:String(e++);a=r.call(t,n,a)}i.items.push(yn(a,void 0,n))}}return i}};function cr(e){let t=I(e)?e.value:e;return t&&typeof t==`string`&&(t=Number(t)),typeof t==`number`&&Number.isInteger(t)&&t>=0?t:null}var lr={collection:`seq`,default:!0,nodeClass:sr,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return tn(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>sr.from(e,t,n)};function ur(e){return typeof e==`bigint`||Number.isInteger(e)}var dr=({value:e})=>JSON.stringify(e),fr=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:dr},{identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:dr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:dr},{identify:ur,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>ur(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:dr}];[or,lr].concat(fr,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function pr(e,t,n){let{replacer:r}=n,i=new sr(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(tr(o,s,n))}return i}var mr=class e extends sr{constructor(){super(),this.add=W.prototype.add.bind(this),this.delete=W.prototype.delete.bind(this),this.get=W.prototype.get.bind(this),this.has=W.prototype.has.bind(this),this.set=W.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(F(e)?(r=B(e.key,``,t),i=B(e.value,r,t)):r=B(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=pr(e,t,n),i=new this;return i.items=r.items,i}};mr.tag=`tag:yaml.org,2002:omap`;var hr=class e extends W{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=F(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new H(e.key,null):new H(e,null),U(this.items,t.key)||this.items.push(t)}get(e,t){let n=U(this.items,e);return!t&&F(n)?I(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=U(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new H(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(tr(e,null,n));return i}};hr.tag=`tag:yaml.org,2002:set`;var gr=Symbol(`break visit`),_r=Symbol(`skip children`),vr=Symbol(`remove item`);function yr(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),br(Object.freeze([]),e,t)}yr.BREAK=gr,yr.SKIP=_r,yr.REMOVE=vr,yr.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},yr.parentCollection=(e,t)=>{let n=yr.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function br(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;t<a.items.length;++t){let r=br(Object.freeze(e.concat([[i,t]])),a.items[t],n);if(typeof r==`number`)t=r-1;else if(r===gr)return gr;else r===vr&&(a.items.splice(t,1),--t)}typeof r==`function`&&i===`key`&&(r=r(t,e))}}return typeof r==`function`?r(t,e):r}function xr(e=5){let t=[];for(let n=0;n<e;n++)t.push(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`.charAt(Math.floor(Math.random()*52)));return t.join(``)}function Sr(e,t,n,r){let i=re(t+n-1,e);for(let e=0;e<t;e++){let t=r(e),a=i.includes(e+n);for(let e of t)e.classList.toggle(`slidev-code-highlighted`,a),e.classList.toggle(`slidev-code-dishonored`,!a),e.classList.toggle(`highlighted`,a),e.classList.toggle(`dishonored`,!a)}}var G=S({}),Cr=[],wr=[];N(G,`$syncUp`,!0),N(G,`$syncDown`,!0),N(G,`$paused`,!1),N(G,`$onSet`,e=>Cr.push(e)),N(G,`$onPatch`,e=>wr.push(e)),ze(),N(G,`$patch`,async()=>!1);var{init:Tr,onPatch:Er,onUpdate:Dr,patch:Or,state:kr}=Be(G,G,!1),K=S({page:0,clicks:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}}),Ar=[],jr=[];N(K,`$syncUp`,!0),N(K,`$syncDown`,!0),N(K,`$paused`,!1),N(K,`$onSet`,e=>Ar.push(e)),N(K,`$onPatch`,e=>jr.push(e)),ze(),N(K,`$patch`,async()=>!1);var{init:Mr,onPatch:Nr,onUpdate:Pr,patch:Fr,state:Ir}=Be(K,{page:1,clicks:0,clicksTotal:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}});function Lr(){let e=r().appContext.app,t=S({nav:ue(),configs:M,themeConfigs:h(()=>M.themeConfig)});e.provide(Me,m(`none`)),e.provide(Re,t),e.provide(ke,h(()=>t.nav.currentSlideNo)),e.provide(Oe,g(ne()));for(let e of zt)e();let{clicksContext:n,currentSlideNo:i,hasPrimarySlide:a,isNotesViewer:o,isPresenter:s,isPrintMode:l}=ue();Mt({title:E,htmlAttrs:M.htmlAttrs}),Gt(),Mr(`${E} - shared`),Tr(`${E} - drawings`);let u=`${location.origin}_${xr()}`,d=h(()=>s.value?`presenter`:`viewer`);function f(){(s.value?k.value.presenterSend:k.value.viewerSend)&&(o.value||l.value||!s.value&&!Le.includes(location.host.split(`:`)[0])||(Fr(`page`,+i.value),Fr(`clicks`,n.value.current),Fr(`clicksTotal`,n.value.total),Fr(`lastUpdate`,{id:u,type:d.value,time:Date.now()})))}let p=ve();p.afterEach(f),c(n,f),Nr(e=>{(s.value?k.value.presenterReceive:k.value.viewerReceive)&&(!a.value||l.value||e.lastUpdate?.type!==d.value&&(+e.page!=+i.value||+n.value.current!=+e.clicks)&&(A.value=!1,p.replace({path:te(e.page,s.value),query:{...p.currentRoute.value.query,clicks:e.clicks||0}})))})}var Rr=i({__name:`App`,setup(e){return Lr(),t(()=>{for(let[e,t]of Object.entries(O.value))document.body.style.setProperty(e,t.toString())}),(e,t)=>{let n=a(`RouterView`);return u(),f(v,null,[C(n),w(`v-if`,!0)],64)}}});function zr(e,t,n){let r=e.push,i=e;return i.ssr=!1,i.hooks=t,i.dirty=!!i.dirty,i.use=e=>Pt(i,e),i.render=()=>n(i),i.invalidate=()=>{for(let e of i.entries.values())delete e._tags;i.dirty=!0,t.callHook(`entries:updated`,i)},i.push=(n,a)=>{let o=a?.onRendered?t.hook(`dom:rendered`,a.onRendered):void 0,s=r(n,a),c=e.entries.get(s._i);return c&&(c._o=n),i.dirty=!0,t.callHook(`entries:updated`,i),{_i:s._i,patch(e){s.patch(e),i.dirty=!0,t.callHook(`entries:updated`,i)},dispose(){o?.(),e.entries.has(s._i)&&(s.dispose(),i.invalidate())}}},t.hook(`entries:updated`,()=>{i.render()}),i}var Br=/\s+/;function Vr(e={}){return t=>Wr(t,e)}function Hr(e){for(let t of e.entries.values())if(t._pending!==void 0)return!0;return!1}function Ur(e,t){let n={_d:t,_t:t.title,_e:new Map([[`htmlAttrs`,t.documentElement],[`bodyAttrs`,t.body]]),_p:{},_s:{},_l:new Map};for(let e of[...t.body.children,...t.head.children]){let t=e.tagName.toLowerCase();if(!Ue.has(t))continue;let r={innerHTML:e.innerHTML};for(let t of e.getAttributeNames())r[t]=e.getAttribute(t);let i=ut({tag:t,props:{}},r);i.key=e.getAttribute(`data-hid`)||void 0;let a=at(i)||ot(i),o=a,s=1;for(;n._e.has(o);)o=`${a}:${s++}`;n._e.set(o,e)}for(let t of e.entries.values())if(t._o!==void 0){let e=t._o;for(let t of[`bodyAttrs`,`htmlAttrs`]){let r=e[t]?.class;if(typeof r==`string`){let e=n._e.get(t);for(let i of r.split(Br))i&&(n._p[`${t}:attr:class:${i}`]=()=>e.classList.remove(i))}}}return n}function Wr(e,t={}){let n=t.document||e.resolvedOptions.document,r=e._dom,i=!!r&&r._d!==n;if(!n||r&&!i&&!e.dirty&&!Hr(e)||e._du)return!1;let a=n.defaultView;e._du=!0;let o=!1;try{let i=function(e,t,n){d._s[e]=!n&&f[e]||t,delete f[e]},s=function(e,t,n,r,a,o){let s=`${e}:event:${t}`,c=d._l.get(s);if(c&&c[0]===o&&c[1]===n&&c[2]===r){i(s,c[4]);return}c?.[4]();let l=`data-${t}`,u=(e=>r.call(a,e)),f=()=>{o.removeEventListener(n,u),a.getAttribute(l)===``&&a.removeAttribute(l),d._l.get(s)?.[3]===u&&d._l.delete(s)};o.addEventListener(n,u),d._l.set(s,[o,n,r,u,f]),a.setAttribute(l,``),i(s,f,!0)},c=function({id:e,$el:t,tag:n}){let r=n.tag.endsWith(`Attrs`);if(d._e.set(e,t),!r){let r=n.textContent;r!=null&&r!==``&&(r!==t.textContent&&(t.textContent=r),i(`${e}:text`,()=>{t.textContent===r&&(t.textContent=``)},!0));let a=n.innerHTML;a!=null&&a!==``&&(a!==t.innerHTML&&(t.innerHTML=a),i(`${e}:html`,()=>{t.innerHTML===a&&(t.innerHTML=``)},!0));let o=`${e}:el`;i(o,f[o]||(()=>{t?.remove(),d._e.delete(e)}))}for(let r in n.props){let o=n.props[r];if(r[0]===`o`&&r[1]===`n`&&typeof o==`function`){let i=r.slice(2);t?.dataset?.[`${r}fired`]&&o.call(t,new((a?.Event)||Event)(i)),s(e,r,i,o,t,n.tag===`bodyAttrs`&&a?a:t);continue}let c=`${e}:attr:${r}`;if(r===`class`&&o)for(let e of o){let n=`${c}:${e}`;i(n,f[n]||(()=>t.classList.remove(e))),t.classList.contains(e)||t.classList.add(e)}else if(r===`style`&&o)for(let[e,n]of o){let r=`${c}:${e}`;i(r,f[r]||(()=>t.style.removeProperty(e))),t.style.setProperty(e,n)}else o!==!1&&o!==null&&(t.getAttribute(r)!==o&&t.setAttribute(r,o===!0?``:String(o)),i(c,f[c]||(()=>t.removeAttribute(r))))}},l={shouldRender:!0,tags:[]};if(tt(e,`dom:beforeRender`,l),!l.shouldRender)return!1;let u=r;if(u?._d!==n){if(u){for(let e in u._s)u._s[e]();for(let e in u._p)u._p[e]();u._s=u._p={},u._e.clear(),u._l.clear()}u=void 0}u?u._p=u._s:u=Ur(e,n),u._s={};let d=u,f=d._p,p=[],m={};e.dirty=!1;let h=Dt(e,t.tagWeight?{tagWeight:t.tagWeight}:void 0),g=[],_={};for(let e of h){let t=_[e._d]||0,r=(t?`${e._d}:${t}`:e._d)||e._h,a={tag:e,id:r,shouldRender:!0};if(e.tag===`meta`&&e._d&&it(e._d)&&(_[e._d]=t+1),g.push(a),e.tag===`title`){n.title=e.textContent,i(`title:`,()=>n.title=d._t);continue}a.$el=d._e.get(r),a.$el?c(a):Ue.has(e.tag)&&p.push(a)}for(let e of p)e.$el=n.createElement(e.tag.tag),c(e),(m[e.tag.tagPosition||`head`]??=n.createDocumentFragment()).appendChild(e.$el);m.head&&n.head.appendChild(m.head),m.bodyOpen&&n.body.insertBefore(m.bodyOpen,n.body.firstChild),m.bodyClose&&n.body.appendChild(m.bodyClose);for(let e in f)f[e]();e._dom=d,o=!0,tt(e,`dom:rendered`,{renders:g})}catch(t){throw e.dirty=!0,t}finally{e._du=!1}return o&&(e.dirty||Hr(e))&&Wr(e,t),o}var Gr=e=>typeof e.tagPriority==`number`?e.tagPriority:100+(Ye[e.tagPriority]||0);function Kr(e={}){e.document=e.document||(typeof window<`u`?document:void 0);let t=e.render||Vr({document:e.document}),n=zr(Ft(t,{document:e.document,propResolvers:e.propResolvers,_tagWeight:Gr,init:[]}),et(e.hooks),t);return e.plugins?.forEach(e=>n.use(e)),e.init?.forEach(e=>e&&n.push(e)),n}function qr(e={}){let t=Vr(),n,r=0;return n=Kr({render:()=>{let e=++r;setTimeout(()=>{e===r&&t(n)},0)},...e}),n.install=At(n),n}var Jr=Object.assign({}),Yr=Object.assign({}),Xr=Object.assign({}),Zr=[Object.values(Jr)[0],Object.values(Yr)[0],Object.values(Xr)[0]].filter(Boolean);function Qr(e,t=``){let n=[`slidev-page`,t],r=e?.meta?.slide?.no;return r!=null&&n.push(`slidev-page-${r}`),n.filter(Boolean).join(` `)}async function $r(){let{saveAs:t}=await j(async()=>{let{saveAs:t}=await import(`./modules/file-saver-BpWusTEB.js`).then(t=>e(t.t(),1));return{saveAs:t}},__vite__mapDeps([0,1]),import.meta.url);t(typeof M.download==`string`?M.download:M.exportFilename?`${M.exportFilename}.pdf`:`./slidev-exported.pdf`,`${M.title}.pdf`)}function ei(e,t,n){return(e.instance?.$).provides[t]??n}var ti=/[\s,]+/;function ni(e,t){let n=t.map(e=>`${Fe}${e}`);e.classList.forEach(t=>{t.startsWith(`slidev-vclick-anim-`)&&!n.includes(t)&&e.classList.remove(t)}),n.forEach(t=>e.classList.add(t))}function ri(){return{install(e){e.directive(`click`,{name:`v-click`,mounted(e,n){let r=ai(e,n,n.value);r!=null&&(e.classList.toggle(De,!0),e.dataset.slidevClicksStart=String(r.start),Number.isFinite(r.end)&&(e.dataset.slidevClicksEnd=String(r.end)),e.watchStopHandle=t(()=>{let t=r.isActive.value,n=r.isCurrent.value,i=t&&!n;r.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ni(e,r.flagAnimations.value),e.classList.toggle(je,n),e.classList.toggle(Ie,i)}))},unmounted:oi}),e.directive(`after`,{name:`v-after`,mounted(e,n){let r=ai(e,n,`+0`);r!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=t(()=>{let t=r.isActive.value,n=r.isCurrent.value,i=t&&!n;r.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ni(e,r.flagAnimations.value),e.classList.toggle(je,n),e.classList.toggle(Ie,i)}))},unmounted:oi}),e.directive(`click-hide`,{name:`v-click-hide`,mounted(e,n){let r=ai(e,n,n.value,!0);r!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=t(()=>{let t=r.isActive.value,n=r.isCurrent.value,i=t&&!n;e.classList.toggle(Ee,t),e.classList.toggle(Ne,t),ni(e,r.flagAnimations.value),e.classList.toggle(je,n),e.classList.toggle(Ie,i)}))},unmounted:oi})}}}var ii=new Map;function ai(e,t,n,r=!1){let i=ei(t,Oe)?.value,a=ei(t,Pe);if(!e||!i)return null;let o=r||t.modifiers.hide!==!1&&t.modifiers.hide!=null,s=Object.keys({...t.modifiers}).filter(e=>e!==`hide`),c=h(()=>{if(s.length>0)return s;let e=a?.clickAnimation||M.clickAnimation;return e?e.split(ti).filter(Boolean):[]}),l=i.calculate(n);if(!l)return null;i.register(e,l);let u=h(()=>o?!l.isActive.value:l.isActive.value),d=h(()=>u.value?`shown`:Number.isFinite(l.end)?i.current<l.start?`before`:`after`:o?`after`:`before`),f={...l,isShown:u,visibilityState:d,flagHide:o,flagAnimations:c};return ii.set(e,f),f}function oi(e,t){e.classList.toggle(De,!1),(ei(t,Oe)?.value)?.unregister(e),e.watchStopHandle?.()}function si(e=_(Ae,m())){let t=ye(e),n=c([de,se,ce,oe,ee,ie.width,ie.height],()=>{setTimeout(t.update,300)},{flush:`post`,immediate:!0});return{...t,stop:n}}function ci(e){return{info:m(fe(e)?.meta.slide??null),update:async()=>{}}}var li={};function ui(e){function t(e){return li[e]??=ci(e)}return{info:h({get(){return t(p(e)).info.value},set(n){t(p(e)).info.value=n}}),update:async(n,r)=>{let i=t(r??p(e)),a=await i.update(n);return a&&(i.info.value=a),a}}}function di(e){return()=>{}}function fi(e,t,n,r=!1){function i(t){return e?ei(e,t):pe(t)}let a=i(Me),o=i(`$$slidev-fontmatter`)??{},s=i(ke),l=h(()=>di(s.value)),u=i(`$$slidev-slide-scale`)??m(1),d=i(`$$slidev-slide-zoom`)??m(1),{left:f,top:p,stop:g}=si(i(`$$slidev-slide-element`)??m()),{isPrintMode:_}=ue(),v=[`slide`,`presenter`].includes(a.value)&&!_.value,y=e?`directive`:`prop`,b=xr(),x;if(Array.isArray(t)?x=t:typeof t==`string`&&t.includes(`,`)?x=t.split(`,`).map(Number):t!=null&&(y=`frontmatter`,b=`${t}`,t=o?.dragPos?.[b],x=t?.split(`,`).map(Number)),y!==`frontmatter`&&!n)throw Error("[Slidev] Can not identify the source position of the v-drag element, please provide an explicit `id` prop.");let S=[g],C=!r&&t!=null&&!Number.isFinite(x?.[3]);x??=[NaN,NaN,0];let w=m(x[2]),T=m(x[0]+x[2]/2),E=m(r?0:x[4]??0),ee=h(()=>E.value*Math.PI/180),te=h(()=>Math.sin(ee.value)),ne=h(()=>Math.cos(ee.value)),re=m(),D=m({left:0,top:0,width:0,height:0}),ie=m(0);function ae(){if(!re.value)return;let e=re.value.getBoundingClientRect();D.value={left:e.left/d.value,top:e.top/d.value,width:e.width/d.value,height:e.height/d.value},ie.value=(D.value.width+D.value.height)/u.value/(Math.abs(te.value)+Math.abs(ne.value))-w.value}S.push(c(w,ae,{flush:`post`}));let oe=m(x[3]??0),O=C?h({get:()=>(C?ie.value:oe.value)||0,set:e=>!C&&(oe.value=e)}):oe,se=m(C?x[1]:x[1]+x[3]/2),k=C?h({get:()=>se.value+O.value/2,set:e=>se.value=e-O.value/2}):se,ce=h(()=>Number.isFinite(T.value)?{position:`absolute`,zIndex:100,left:`${T.value-w.value/2}px`,top:`${k.value-O.value/2}px`,width:`${w.value}px`,height:C?void 0:`${O.value}px`,transformOrigin:`center center`,transform:`rotate(${E.value}deg)`}:{position:`absolute`,zIndex:100});S.push(c([T,k,w,O,E],([e,t,r,i,a])=>{let o=[e-r/2,t-i/2,r].map(Math.round).join();o+=C?y===`directive`?`,NaN`:`,_`:`,${Math.round(i)}`,Math.round(a)!==0&&(o+=`,${Math.round(a)}`),y===`directive`&&(o=`[${o}]`),l.value(b,o,y,n)}));let A={dragId:b,dataSource:y,markdownSource:n,isArrow:r,zoom:d,autoHeight:C,x0:T,y0:k,width:w,height:O,rotate:E,container:re,containerStyle:ce,watchStopHandles:S,dragging:h(()=>le.value===A),mounted(){v&&(ae(),t||setTimeout(()=>{ae(),T.value=(D.value.left+D.value.width/2-f.value)/u.value,k.value=(D.value.top-p.value)/u.value,w.value=D.value.width/u.value,O.value=D.value.height/u.value},100))},unmounted(){v&&A.stopDragging()},startDragging(){v&&(ae(),le.value=A)},stopDragging(){v&&le.value===A&&(le.value=null)}};return S.push(Ce(re,e=>{let t=document.querySelector(`#drag-control-container`);t&&e.target&&t.contains(e.target)||A.stopDragging()}),c(_e(),e=>{e||A.stopDragging()})),A}function pi(){return{install(e){e.directive(`drag`,{name:`v-drag`,created(e,t,n){let r=fi(t,t.value,n.props?.markdownSource);n.props&&(n.props={...n.props},delete n.props.markdownSource),r.container.value=e,e.draggingState=r,e.dataset.dragId=r.dragId,r.watchStopHandles.push(c(r.containerStyle,t=>{for(let[n,r]of Object.entries(t))r&&(e.style[n]=r)},{immediate:!0})),e.addEventListener(`dblclick`,r.startDragging)},mounted(e){e.draggingState.mounted()},unmounted(e){let t=e.draggingState;t.unmounted(),e.removeEventListener(`dblclick`,t.startDragging),t.watchStopHandles.forEach(e=>e())}})}}}function mi(){return Math.floor(Math.random()*2**31)}var hi=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};function gi(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function _i(e,t,n){let r=[];e.forEach(e=>r.push(...e)),gi(r,t,n)}function vi(e,t){return e[0]===t[0]&&e[1]===t[1]}function yi(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)gi(e,s,i);let c=bi(o,a,r);if(i){for(let e of o)gi(e,s,-i);_i(c,s,-i)}return c}function bi(e,t,n){let r=[];for(let t of e){let e=[...t];vi(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach(e=>{o.push({s,edge:e})})}if(o=o.filter(e=>!(e.edge.ymax<=s)),o.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(n!==1||c%t===0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),c++}return i}function xi(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),yi(e,r,n,i||1)}var Si=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=xi(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function Ci(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var wi=class extends Si{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=t.strokeWidth*4),n=Math.max(n,.1);let r=xi(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=n*.5*Math.cos(i),s=n*.5*Math.sin(i);for(let[e,t]of r)Ci([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Ti=class extends Si{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Ei=class{constructor(e){this.helper=e}fillPolygons(e,t){t=Object.assign({},t,{hachureAngle:0});let n=xi(e,t);return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=Ci(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+Math.random()*2*a,c=o-a+Math.random()*2*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},Di=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=xi(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?t.strokeWidth*4:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?t.strokeWidth*4:t.hachureGap:t.dashGap,i=[];return e.forEach(e=>{let a=Ci(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}}),i}},Oi=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?t.strokeWidth*4:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset;t=Object.assign({},t,{hachureGap:n+r});let i=xi(e,t);return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach(e=>{let i=Ci(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=e*2*t,a=(e+1)*2*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}}),r}},q={};function ki(e,t){let n=e.fillStyle||`hachure`;if(!q[n])switch(n){case`zigzag`:q[n]||(q[n]=new wi(t));break;case`cross-hatch`:q[n]||(q[n]=new Ti(t));break;case`dots`:q[n]||(q[n]=new Ei(t));break;case`dashed`:q[n]||(q[n]=new Di(t));break;case`zigzag-line`:q[n]||(q[n]=new Oi(t));break;default:n=`hachure`,q[n]||(q[n]=new Si(t))}return q[n]}var Ai=0,ji=1,Mi=2,Ni={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Pi(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:Ai,text:RegExp.$1},e=e.substr(RegExp.$1.length);else if(e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))t[t.length]={type:ji,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length);else return[];return t[t.length]={type:Mi,text:``},t}function Fi(e,t){return e.type===t}function Ii(e){let t=[],n=Pi(e),r=`BOD`,i=0,a=n[i];for(;!Fi(a,Mi);){let o=0,s=[];if(r===`BOD`){if(a.text===`M`||a.text===`m`)i++,o=Ni[a.text],r=a.text;else return Ii(`M0,0`+e)}else Fi(a,ji)?o=Ni[r]:(i++,o=Ni[a.text],r=a.text);if(i+o<n.length){for(let e=i;e<i+o;e++){let t=n[e];if(Fi(t,ji))s[s.length]=+t.text;else throw Error(`Param not a number: `+r+`,`+t.text)}if(typeof Ni[r]==`number`){let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}else throw Error(`Bad segment: `+r)}else throw Error(`Path data ended short`)}return t}function Li(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function Ri(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(Vi(r,i,c,l,e,n,a,o,s).forEach(function(e){t.push({key:`C`,data:e})}),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function zi(e){return Math.PI*e/180}function Bi(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Vi(e,t,n,r,i,a,o,s,c,l){let u=zi(o),d=[],f=0,p=0,m=0,h=0;if(l)[f,p,m,h]=l;else{[e,t]=Bi(e,t,-u),[n,r]=Bi(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i=d*i,a=d*a);let g=s===c?-1:1,_=i*i,v=a*a,y=_*v-_*l*l-v*o*o,b=_*l*l+v*o*o,x=g*Math.sqrt(Math.abs(y/b));m=x*i*l/a+(e+n)/2,h=x*-a*o/i+(t+r)/2,f=Math.asin(parseFloat(((t-h)/a).toFixed(9))),p=Math.asin(parseFloat(((r-h)/a).toFixed(9))),e<m&&(f=Math.PI-f),n<m&&(p=Math.PI-p),f<0&&(f=Math.PI*2+f),p<0&&(p=Math.PI*2+p),c&&f>p&&(f-=Math.PI*2),!c&&p>f&&(p-=Math.PI*2)}let g=p-f;if(Math.abs(g)>Math.PI*120/180){let e=p,t=n,s=r;p=c&&p>f?f+Math.PI*120/180*1:f+Math.PI*120/180*-1,n=m+i*Math.cos(p),r=h+a*Math.sin(p),d=Vi(n,r,t,s,i,a,o,0,c,[p,e,m,h])}g=p-f;let _=Math.cos(f),v=Math.sin(f),y=Math.cos(p),b=Math.sin(p),x=Math.tan(g/4),S=4/3*i*x,C=4/3*a*x,w=[e,t],T=[e+S*v,t-C*_],E=[n+S*b,r-C*y],ee=[n,r];if(T[0]=2*w[0]-T[0],T[1]=2*w[1]-T[1],l)return[T,E,ee].concat(d);{d=[T,E,ee].concat(d);let e=[];for(let t=0;t<d.length;t+=3){let n=Bi(d[t][0],d[t][1],u),r=Bi(d[t+1][0],d[t+1][1],u),i=Bi(d[t+2][0],d[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var Hi={randOffset:ta,randOffsetWithRange:na,ellipse:qi,doubleLineOps:ra};function J(e,t,n,r,i){return{type:`path`,ops:X(e,t,n,r,i)}}function Ui(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...X(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...X(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?J(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function Wi(e,t){return Ui(e,!0,t)}function Gi(e,t,n,r,i){return Wi([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function Ki(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=ca(n[0],1*(1+t.roughness*.2),t),i=t.disableMultiStroke?[]:ca(n[0],1.5*(1+t.roughness*.22),ia(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=ca(a,1*(1+t.roughness*.2),t),n=t.disableMultiStroke?[]:ca(a,1.5*(1+t.roughness*.22),ia(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function qi(e,t,n,r,i){return Yi(e,t,i,Ji(n,r,i)).opset}function Ji(e,t,n){let r=Math.sqrt(Math.PI*2*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=Math.PI*2/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=Y(o*c,n),s+=Y(s*c,n),{increment:a,rx:o,ry:s}}function Yi(e,t,n,r){let[i,a]=ua(r.increment,e,t,r.rx,r.ry,1,r.increment*oa(.1,oa(.4,1,n),n),n),o=la(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=ua(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=la(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function Xi(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=Y(d*.01,c),f+=Y(f*.01,c);let p=i,m=a;for(;p<0;)p+=Math.PI*2,m+=Math.PI*2;m-p>Math.PI*2&&(p=0,m=Math.PI*2);let h=Math.PI*2/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=da(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=da(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...X(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...X(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function Zi(e,t){let n=Ri(Li(Ii(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...X(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...fa(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...X(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function Qi(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+Y(e,t),r[0][1]+Y(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+Y(e,t),r[a][1]+Y(e,t)]})}}return{type:`fillPath`,ops:n}}function $i(e,t){return ki(t,Hi).fillPolygons(e,t)}function ea(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=Y(l*.01,o),u+=Y(u*.01,o);let d=i,f=a;for(;d<0;)d+=Math.PI*2,f+=Math.PI*2;f-d>Math.PI*2&&(d=0,f=Math.PI*2);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),$i([m],o)}function ta(e,t){return Y(e,t)}function na(e,t,n){return oa(e,t,n)}function ra(e,t,n,r,i){return X(e,t,n,r,i,!0)}function ia(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function aa(e){return e.randomizer||=new hi(e.seed||0),e.randomizer.next()}function oa(e,t,n,r=1){return n.roughness*r*(aa(n)*(t-e)+e)}function Y(e,t,n=1){return oa(-e,e,t,n)}function X(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sa(e,t,n,r,i,!0,!1);if(o)return s;let c=sa(e,t,n,r,i,!0,!0);return s.concat(c)}function sa(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+aa(i)*.2,p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=Y(p,i,l),m=Y(m,i,l);let h=[],g=()=>Y(d,i,l),_=()=>Y(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:Y(u,i,l)),t+(v?0:Y(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function ca(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]),r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+Y(t,n),e[i][1]+Y(t,n)]),i===e.length-1&&r.push([e[i][0]+Y(t,n),e[i][1]+Y(t,n)]);return la(r,null,n)}function la(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+Y(e,n),t[1]+Y(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...sa(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function ua(e,t,n,r,i,a,o,s){let c=s.roughness===0,l=[],u=[];if(c){e/=4,u.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=Math.PI*2;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];l.push(e),u.push(e)}u.push([t+r*Math.cos(0),n+i*Math.sin(0)]),u.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let c=Y(.5,s)-Math.PI/2;u.push([Y(a,s)+t+.9*r*Math.cos(c-e),Y(a,s)+n+.9*i*Math.sin(c-e)]);let d=Math.PI*2+c-.01;for(let o=c;o<d;o+=e){let e=[Y(a,s)+t+r*Math.cos(o),Y(a,s)+n+i*Math.sin(o)];l.push(e),u.push(e)}u.push([Y(a,s)+t+r*Math.cos(c+Math.PI*2+o*.5),Y(a,s)+n+i*Math.sin(c+Math.PI*2+o*.5)]),u.push([Y(a,s)+t+.98*r*Math.cos(c+o),Y(a,s)+n+.98*i*Math.sin(c+o)]),u.push([Y(a,s)+t+.9*r*Math.cos(c+o*.5),Y(a,s)+n+.9*i*Math.sin(c+o*.5)])}return[u,l]}function da(e,t,n,r,i,a,o,s,c){let l=a+Y(.1,c),u=[];u.push([Y(s,c)+t+.9*r*Math.cos(l-e),Y(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([Y(s,c)+t+r*Math.cos(a),Y(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),la(u,null,c)}function fa(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:Y(l[0],s)),o[1]+(f?0:Y(l[0],s))]}),u=f?[i,a]:[i+Y(l[p],s),a+Y(l[p],s)],c.push({op:`bcurveTo`,data:[e+Y(l[p],s),t+Y(l[p],s),n+Y(l[p],s),r+Y(l[p],s),u[0],u[1]]});return c}function pa(e){return[...e]}function ma(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(pa(e[0]),pa(e[1]),pa(e[2]),pa(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(pa(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function ha(e,t){return Math.sqrt(ga(e,t))}function ga(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function _a(e,t,n){let r=ga(t,n);if(r===0)return ga(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),ga(e,va(t,n,i))}function va(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function ya(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}function ba(e,t,n,r){let i=r||[];if(ya(e,t)<n){let n=e[t+0];i.length?ha(i[i.length-1],n)>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=va(a,o,r),u=va(o,s,r),d=va(s,c,r),f=va(l,u,r),p=va(u,d,r),m=va(f,p,r);ba([a,l,f,m],0,n,i),ba([m,p,d,c],0,n,i)}return i}function xa(e,t){return Sa(e,0,e.length,t)}function Sa(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=_a(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(Sa(e,t,l+1,r,a),Sa(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function Ca(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)ba(e,n*3,t,r);return n&&n>0?Sa(r,0,r.length,n):r}function wa(e,t,n){let r=Ri(Li(Ii(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...Ca(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=xa(e,n);t.length&&u.push(t)}return u}var Z=`none`,Ta=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return mi()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[J(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=Gi(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(Qi([i],a)):o.push($i([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=Ji(n,r,a),c=Yi(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=Yi(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push($i([c.estimatedPoints],a))}return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[Ui(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=Xi(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=Xi(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(ea(e,t,n,r,i,a,c))}return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=Ki(e,n);if(n.fill&&n.fill!==Z){if(n.fillStyle===`solid`){let t=Ki(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...Ca(ma([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...Ca(ma(r),10,(1+n.roughness)/2))}t.length&&r.push($i([t],n))}}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=Ui(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(Qi([e],n)):r.push($i([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Z,a=n.stroke!==Z,o=!!(n.simplification&&n.simplification<1),s=o?4-4*(n.simplification||1):(1+n.roughness)/2,c=wa(e,1,s),l=Zi(e,n);if(i){if(n.fillStyle===`solid`){if(c.length===1){let t=Zi(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(Qi(c,n))}else r.push($i(c,n))}return a&&(o?c.forEach(e=>{r.push(Ui(e,!1,n))}):r.push(l)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map(e=>+e.toFixed(t)):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter((e,t)=>t===0||e.op!==`move`)}},Ea=`http://www.w3.org/2000/svg`,Da=800,Oa=null;function ka(){return Oa||=new Ta().defaultOptions,Oa}function Aa(e,t,n){return{...ka(),maxRandomnessOffset:2,roughness:e===`highlight`?3:1.5,bowing:1,stroke:`#000`,strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:e!==`double`,disableMultiStrokeFill:!1,seed:t,...n}}function ja(e){let t=e.padding;if(t||t===0){if(typeof t==`number`)return[t,t,t,t];if(Array.isArray(t)){let e=t;if(e.length)switch(e.length){case 4:return[...e];case 1:return[e[0],e[0],e[0],e[0]];case 2:return[...e,...e];case 3:return[...e,e[1]];default:return[e[0],e[1],e[2],e[3]]}}}return[5,5,5,5]}function Ma(e,t,n,r,i,a){let o=[],s=n.strokeWidth||2,c=ja(n),l=n.animate===void 0||!!n.animate,u=n.iterations||2,d=+!!n.rtl,f=Aa(`single`,a,n);switch(n.type){case`underline`:{let e=t.y+t.h+c[2];for(let n=d;n<u+d;n++)n%2?o.push(J(t.x+t.w,e,t.x,e,f)):o.push(J(t.x,e,t.x+t.w,e,f));break}case`strike-through`:{let e=t.y+t.h/2;for(let n=d;n<u+d;n++)n%2?o.push(J(t.x+t.w,e,t.x,e,f)):o.push(J(t.x,e,t.x+t.w,e,f));break}case`box`:{let e=t.x-c[3],n=t.y-c[0],r=t.w+(c[1]+c[3]),i=t.h+(c[0]+c[2]);for(let t=0;t<u;t++)o.push(Gi(e,n,r,i,f));break}case`bracket`:{let e=Array.isArray(n.brackets)?n.brackets:n.brackets?[n.brackets]:[`right`],r=t.x-c[3]*2,i=t.x+t.w+c[1]*2,a=t.y-c[0]*2,s=t.y+t.h+c[2]*2;for(let n of e){let e;switch(n){case`bottom`:e=[[r,t.y+t.h],[r,s],[i,s],[i,t.y+t.h]];break;case`top`:e=[[r,t.y],[r,a],[i,a],[i,t.y]];break;case`left`:e=[[t.x,a],[r,a],[r,s],[t.x,s]];break;case`right`:e=[[t.x+t.w,a],[i,a],[i,s],[t.x+t.w,s]]}e&&o.push(Ui(e,!1,f))}break}case`crossed-off`:{let e=t.x,n=t.y,r=e+t.w,i=n+t.h;for(let t=d;t<u+d;t++)t%2?o.push(J(r,i,e,n,f)):o.push(J(e,n,r,i,f));for(let t=d;t<u+d;t++)t%2?o.push(J(e,i,r,n,f)):o.push(J(r,n,e,i,f));break}case`circle`:{let e=Aa(`double`,a,n),r=t.w+(c[1]+c[3]),i=t.h+(c[0]+c[2]),s=t.x-c[3]+r/2,l=t.y-c[0]+i/2,d=Math.floor(u/2),p=u-d*2;for(let t=0;t<d;t++)o.push(qi(s,l,r,i,e));for(let e=0;e<p;e++)o.push(qi(s,l,r,i,f));break}case`highlight`:{let e=Aa(`highlight`,a,n);s=t.h*.95;let r=t.y+t.h/2;for(let n=d;n<u+d;n++)n%2?o.push(J(t.x+t.w,r,t.x,r,e)):o.push(J(t.x,r,t.x+t.w,r,e));break}}if(o.length){let t=Pa(o),a=[],c=[],u=0,d=(e,t,n)=>e.setAttribute(t,n);for(let r of t){let t=document.createElementNS(Ea,`path`);if(d(t,`d`,r),d(t,`fill`,`none`),d(t,`stroke`,n.color||`currentColor`),d(t,`stroke-width`,`${s}`),n.opacity!==void 0&&d(t,`style`,`opacity:${n.opacity}`),l){let e=t.getTotalLength();a.push(e),u+=e}e.appendChild(t),c.push(t)}if(l){let e=0;for(let t=0;t<c.length;t++){let n=c[t],o=a[t],s=u?o/u*i:0,l=r+e,d=n.style;d.strokeDashoffset=`${o}`,d.strokeDasharray=`${o}`,d.animation=`rough-notation-dash ${s}ms ease-out ${l}ms forwards`,e+=s}return Na(i+r)}}return Na(0)}function Na(e){return new Promise(t=>setTimeout(t,e))}function Pa(e){let t=[];for(let n of e){let e=``;for(let r of n.ops){let n=r.data;switch(r.op){case`move`:e.trim()&&t.push(e.trim()),e=`M${n[0]} ${n[1]} `;break;case`bcurveTo`:e+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case`lineTo`:e+=`L${n[0]} ${n[1]} `}}e.trim()&&t.push(e.trim())}return t}function Fa(){if(!window.__rno_kf_s){let e=window.__rno_kf_s=document.createElement(`style`);e.textContent=`@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }`,document.head.appendChild(e)}}var Ia=Object.defineProperty,La=(e,t,n)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(La(e,typeof t==`symbol`?t:t+``,n),n),Ra=class{constructor(e,t){Q(this,`_state`,`unattached`),Q(this,`_config`),Q(this,`_resizing`,!1),Q(this,`_ro`),Q(this,`_seed`,mi()),Q(this,`_e`),Q(this,`_svg`),Q(this,`_lastSizes`,[]),Q(this,`_animationDelay`,0),Q(this,`_resizeListener`,()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state===`showing`&&this.haveRectsChanged()&&this.show()},400))}),Q(this,`pendingRefresh`),this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,t){this._config[e]!==t&&(this._config[e]=t,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `)))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state===`unattached`&&this._e.parentElement){Fa();let e=this._svg=document.createElementNS(Ea,`svg`);e.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `));let t=e.style;t.position=`absolute`,t.top=`0`,t.left=`0`,t.overflow=`visible`,t.pointerEvents=`none`,t.width=`100px`,t.height=`100px`;let n=this._config.type===`highlight`;if(this._e.insertAdjacentElement(n?`beforebegin`:`afterend`,e),this._state=`not-showing`,n){let e=window.getComputedStyle(this._e).position;(!e||e===`static`)&&(this._e.style.position=`relative`)}this.attachListeners()}}detachListeners(){window.removeEventListener(`resize`,this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener(`resize`,this._resizeListener,{passive:!0}),!this._ro&&`ResizeObserver`in window&&(this._ro=new window.ResizeObserver(e=>{for(let t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){let e=this.rects();if(e.length===this._lastSizes.length){for(let t=0;t<e.length;t++)if(!this.isSameRect(e[t],this._lastSizes[t]))return!0}else return!0}return!1}isSameRect(e,t){let n=(e,t)=>Math.round(e)===Math.round(t);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return this._state!==`not-showing`}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case`unattached`:break;case`showing`:this.hide(),this._svg&&await this.render(this._svg,!0);break;case`not-showing`:this.attach(),this._svg&&await this.render(this._svg,!1)}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state=`not-showing`}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state=`unattached`,this.detachListeners()}async render(e,t){let n=this._config;t&&(n=JSON.parse(JSON.stringify(this._config)),n.animate=!1);let r=this.rects(),i=0;r.forEach(e=>i+=e.w);let a=n.animationDuration||Da,o=0,s=[];for(let t=0;t<r.length;t++){let c=a*(r[t].w/i);s.push(Ma(e,r[t],n,o+this._animationDelay+(this._config.delay||0),c,this._seed)),o+=c}return this._lastSizes=r,this._state=`showing`,await Promise.all(s)}rects(){let e=[];if(this._svg){if(this._config.multiline){let t=this._e.getClientRects();for(let n=0;n<t.length;n++)e.push(this.svgRect(this._svg,t[n]))}else e.push(this.svgRect(this._svg,this._e.getBoundingClientRect()))}return e}svgRect(e,t){let n=e.getBoundingClientRect(),r=t;return{x:(r.x||r.left)-(n.x||n.left),y:(r.y||r.top)-(n.y||n.top),w:r.width,h:r.height}}};function za(e,t){return new Ra(e,t)}function $(e,t){return e.class=[e.class,t].filter(Boolean).join(` `),e}var Ba={box:e=>Object.assign(e,{type:`box`}),circle:e=>Object.assign(e,{type:`circle`}),underline:e=>Object.assign(e,{type:`underline`}),highlight:e=>Object.assign(e,{type:`highlight`}),"strike-through":e=>Object.assign(e,{type:`strike-through`}),"crossed-off":e=>Object.assign(e,{type:`crossed-off`}),bracket:e=>Object.assign(e,{type:`bracket`}),strike:e=>Object.assign(e,{type:`strike-through`}),cross:e=>Object.assign(e,{type:`crossed-off`}),crossed:e=>Object.assign(e,{type:`crossed-off`}),linethrough:e=>Object.assign(e,{type:`strike-through`}),"line-through":e=>Object.assign(e,{type:`strike-through`}),black:e=>$(e,`text-black`),blue:e=>$(e,`text-blue`),cyan:e=>$(e,`text-cyan`),gray:e=>$(e,`text-gray`),green:e=>$(e,`text-green`),indigo:e=>$(e,`text-indigo`),lime:e=>$(e,`text-lime`),orange:e=>$(e,`text-orange`),pink:e=>$(e,`text-pink`),purple:e=>$(e,`text-purple`),red:e=>$(e,`text-red`),teal:e=>$(e,`text-teal`),white:e=>$(e,`text-white`),yellow:e=>$(e,`text-yellow`)},Va=[[/^delay-?(\d+)?$/,(e,t,n)=>(t.delay=(e[1]?Number.parseInt(e[1]):n)||300,t)],[/^(?:op|opacity)-?(\d+)?$/,(e,t,n)=>(t.opacity=((e[1]?Number.parseInt(e[1]):n)||100)/100,t)]];function Ha(){return{install(e){e.directive(`mark`,{name:`v-mark`,mounted:(e,n)=>{let{isPrintMode:r}=ue(),i=h(()=>{let e=typeof n.value==`object`&&!Array.isArray(n.value)?{...n.value}:{at:n.value},t={at:e.at},i=Object.entries(n.modifiers).filter(([e,n])=>{if(Ba[e])return t=Ba[e](t,n),!1;for(let[r,i]of Va){let a=e.match(r);if(a)return t=i(a,t,n),!1}return!0});i.length&&console.warn(`[Slidev] Invalid modifiers for v-mark:`,i);let a={...t,...e};return a.type||=`underline`,r.value&&(a.animationDuration=1),a}),a=za(e,i.value),o=ai(e,n,i.value.at);if(!o){a.show();return}e.watchStopHandle=t(()=>{let e;i.value.class&&(a.class=i.value.class),i.value.color&&(a.color=i.value.color);let t=i.value.at;e=t===!0||t!==!1&&o.isActive.value,e!=null&&(e?a.show():a.hide())})},unmounted:e=>{e.watchStopHandle?.()}})}}}function Ua(){return{install(e){let t=xe();e.directive(`motion`,{name:`v-motion`,mounted(e,n,r,i){let a=ei(n,Oe),o=ei(n,ke),s=ei(n,Me),{currentPage:l,clicks:u,isPrintMode:d}=ue(),f=r.props={...r.props},p={...f.initial,...f.variants?.[`slidev-initial`]},m={...f.enter,...f.variants?.[`slidev-enter`]},h={...f.leave,...f.variants?.[`slidev-leave`]};delete f.initial,delete f.enter,delete f.leave;let g=`${xr()}-`,_=[];for(let e of Object.keys(f))if(e.startsWith(`click-`)){let t=e.slice(6),n=t.includes(`-`)?t.split(`-`).map(Number):+t,r=g+t;_.push({id:r,at:n,variant:{...f[e]},info:a?.value.calculate(n)}),delete f[e]}_.sort((e,t)=>(Array.isArray(e.at)?e.at[0]:e.at)-(Array.isArray(t.at)?t.at[0]:t.at)),t.created(e,n,r,i),t.mounted(e,n,r,i);let v=e.motionInstance;v.clickIds=_.map(e=>e.id),v.set(p),v.watchStopHandle=c([o,l,u].filter(Boolean),()=>{let t=ii.get(e)?.visibilityState.value??`shown`;if(!a?.value||![`slide`,`presenter`].includes(s?.value??``)){let e={...p,...m};for(let{variant:t}of _)Object.assign(e,t);v.set(e)}else if(d.value||o?.value===l.value){if(t===`shown`){let e={...p,...m};for(let{variant:t,info:n}of _)(!n||n.isActive.value)&&Object.assign(e,t);d.value?v.set(e):v.apply(e)}else v.apply(t===`before`?p:h)}else v.apply((o?.value??-1)>l.value?p:h)},{immediate:!0})},unmounted(e){e.motionInstance.watchStopHandle()}})}}}var Wa=Object.assign({}),Ga=Object.assign({}),Ka=Object.assign({}),qa=[Object.values(Wa)[0],Object.values(Ga)[0],Object.values(Ka)[0]].filter(Boolean);function Ja(){let e=[];function t(e){if(!M.remote||M.remote===e.query.password)return!0;if(M.remote&&e.query.password===void 0){let e=prompt(`Enter password`);if(M.remote===e)return!0}return e.params.no?{path:`/${e.params.no}`}:{path:``}}return e.push({name:`entry`,path:`/entry`,component:()=>j(()=>import(`./slidev/entry-D6J4lPyB.js`),__vite__mapDeps([2,3,1,4,5,6]),import.meta.url),beforeEnter:t},{name:`overview`,path:`/overview`,component:()=>j(()=>import(`./slidev/overview-BfXSNxbX.js`),__vite__mapDeps([7,3,1,4,8,5,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url),beforeEnter:t},{name:`notes`,path:`/notes`,component:()=>j(()=>import(`./slidev/notes-DeLJKKZm.js`),__vite__mapDeps([22,3,1,4,8,5,9,10,12,23,13,14,24]),import.meta.url),beforeEnter:t},{name:`notes-edit`,path:`/notes-edit`,component:()=>j(()=>import(`./slidev/notes-edit-DaTWDoRv.js`),__vite__mapDeps([25,3,1,4,8,5,9,10,12,23]),import.meta.url),beforeEnter:t},{name:`presenter`,path:`/presenter/:no`,component:()=>j(()=>import(`./slidev/presenter-CBeEHWD8.js`),__vite__mapDeps([26,3,1,4,8,5,9,10,18,27,12,28,29,13,14,24,15,16,17,19,20,30,31,32]),import.meta.url),beforeEnter:t},{path:`/presenter`,redirect:{path:`/presenter/1`}}),e.push({name:`play`,path:`/:no`,component:()=>j(()=>import(`./slidev/play-bwjAMvBL.js`),__vite__mapDeps([33,3,1,4,8,5,9,10,18,11,23,15,16,17,19,30,12,28,31,34]),import.meta.url)},{path:``,redirect:{path:`/1`}},{path:`/:pathMatch(.*)*`,name:`NotFound`,component:()=>j(()=>import(`./slidev/404-OLfNBXtf.js`),__vite__mapDeps([35,3,1,4,8,5,9,10,36]),import.meta.url)}),qa.reduce((e,t)=>t(e),e)}async function Ya(e){function t(){document.documentElement.style.setProperty(`--vh`,`${window.innerHeight*.01}px`)}t(),window.addEventListener(`resize`,t);let n=he({history:Te(`./`),routes:Ja()});e.use(n),e.use(qr()),e.use(ri()),e.use(Ha()),e.use(pi()),e.use(Ua()),e.use(x,{container:`#twoslash-container`});let r={app:e,router:n};for(let e of Zr)await e(r)}async function Xa(){let e=y(Rr);await Ya(e),e.mount(`#app`)}Xa();export{Qr as a,Er as c,Sr as d,Ht as f,Mt as h,$r as i,Or as l,Wt as m,ci as n,Ir as o,Ut as p,si as r,kr as s,ui as t,xr as u};
|
lecture-02/assets/interactive--xmYYvz-.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ct as e,E as t,V as n,W as r,_ as i,b as a,w as o,wt as s,xt as c,y as l}from"./modules/shiki-ZbpftOCw.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as d}from"./slidev/context-Dg_28hwb.js";import{t as f}from"./DeckFooter-6-dHlE3F.js";var p={class:`dl-widget__stage`},m={class:`dl-widget__controls`},h={class:`dl-widget__readout`},g=u(t({__name:`WidgetFrame`,props:{maxWidth:{default:`100%`},controlsFirst:{type:Boolean}},setup(t){let{$slidev:o,$nav:s,$clicksContext:l,$clicks:u,$page:f,$renderContext:g,$frontmatter:_}=d(),v=t;return(t,o)=>(n(),a(`div`,{class:c([`dl-widget`,{"is-controls-first":v.controlsFirst}]),style:e({maxWidth:v.maxWidth})},[i(`div`,p,[r(t.$slots,`default`,{},void 0,!0)]),i(`div`,m,[r(t.$slots,`controls`,{},void 0,!0)]),i(`div`,h,[r(t.$slots,`readout`,{},void 0,!0)])],6))}}),[[`__scopeId`,`data-v-0f64089e`]]),_={class:`slidev-layout dl-interactive`},v={key:0,class:`dl-interactive__title`},y={class:`dl-interactive__stage`},b=u(t({__name:`interactive`,props:{heading:{},asideWidth:{},asideLeft:{type:Boolean}},setup(t){let{$slidev:u,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:b,$frontmatter:x}=d(),S=t;return(t,u)=>{let d=f;return n(),a(`div`,_,[S.heading?(n(),a(`h1`,v,s(S.heading),1)):l(`v-if`,!0),i(`div`,{class:c([`dl-interactive__grid`,{"is-aside-left":S.asideLeft}])},[i(`div`,y,[r(t.$slots,`default`,{},void 0,!0)]),i(`div`,{class:`dl-interactive__aside`,style:e({flexBasis:S.asideWidth??`17rem`})},[r(t.$slots,`aside`,{},void 0,!0)],4)],2),o(d)])}}}),[[`__scopeId`,`data-v-0c449bbd`]]);export{g as n,b as t};
|
lecture-02/assets/interactive-DDMF3hhv.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-widget[data-v-0f64089e]{flex-direction:column;gap:.6rem;width:100%;height:100%;min-height:0;display:flex}.dl-widget.is-controls-first[data-v-0f64089e]{flex-direction:column-reverse;justify-content:flex-end}.dl-widget__stage[data-v-0f64089e]{flex:auto;justify-content:center;align-items:center;min-height:0;display:flex}.dl-widget__controls[data-v-0f64089e]{flex-wrap:wrap;flex:none;align-items:center;gap:.5rem 1.2rem;display:flex}.dl-widget__controls[data-v-0f64089e]:empty,.dl-widget__readout[data-v-0f64089e]:empty{display:none}.dl-widget__readout[data-v-0f64089e]{color:var(--dl-muted);font-variant-numeric:tabular-nums;flex:none;font-size:.82rem}.dl-interactive[data-v-0c449bbd]{flex-direction:column;display:flex}.dl-interactive__title[data-v-0c449bbd]{margin-bottom:.7rem}.dl-interactive__grid[data-v-0c449bbd]{flex:auto;align-items:stretch;gap:1.6rem;min-height:0;display:flex}.dl-interactive__grid.is-aside-left[data-v-0c449bbd]{flex-direction:row-reverse}.dl-interactive__stage[data-v-0c449bbd]{flex:auto;justify-content:center;align-items:center;min-width:0;display:flex}.dl-interactive__aside[data-v-0c449bbd]{font-size:var(--dl-fs-secondary);flex-grow:0;flex-shrink:0;overflow-y:auto}.dl-interactive__aside[data-v-0c449bbd]:empty{display:none}
|
lecture-02/assets/iris-setosa-CYyB8_KQ.jpg
ADDED
|
lecture-02/assets/iris-versicolor-DED4EHyk.jpg
ADDED
|
lecture-02/assets/iris-virginica-7D5qYfzB.jpg
ADDED
|
lecture-02/assets/md-5DLtPaNo.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-mnist[data-v-8c4f21b8]{width:100%;height:100%}.dl-mnist__box[data-v-8c4f21b8]{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1.2px}.dl-mnist__ink[data-v-8c4f21b8]{fill:var(--dl-heading)}.dl-mnist__digit[data-v-8c4f21b8]{fill:var(--dl-heading);font-size:20px}.dl-mnist__bar[data-v-8c4f21b8]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.2px}.dl-mnist__bar.is-live[data-v-8c4f21b8]{fill:var(--dl-accent);stroke:var(--dl-accent-strong)}.dl-mnist__arrow[data-v-8c4f21b8],.dl-mnist__leader[data-v-8c4f21b8]{stroke:var(--dl-muted);stroke-width:1.2px;fill:none}.dl-mnist__leader[data-v-8c4f21b8]{stroke-dasharray:3 3}.dl-mnist__head[data-v-8c4f21b8]{fill:var(--dl-muted)}.dl-mnist__head.is-fwd[data-v-8c4f21b8]{fill:var(--dl-accent)}.dl-mnist__head.is-back[data-v-8c4f21b8]{fill:var(--dl-danger)}.dl-mnist__cap[data-v-8c4f21b8]{fill:var(--dl-body);font-size:11px}.dl-mnist__sub[data-v-8c4f21b8],.dl-mnist__idx[data-v-8c4f21b8]{fill:var(--dl-muted);font-size:9px}.dl-mnist__op[data-v-8c4f21b8]{fill:var(--dl-muted);font-size:10px}.dl-mnist__count[data-v-8c4f21b8]{fill:var(--dl-heading);font-size:11px;font-weight:600}.dl-mnist__code[data-v-8c4f21b8]{fill:var(--dl-accent-strong);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:10px}.dl-mnist__code.is-back[data-v-8c4f21b8]{fill:var(--dl-danger)}.dl-mnist__arrow.is-back[data-v-8c4f21b8]{stroke:var(--dl-danger);stroke-dasharray:5 3}.dl-mnist__arrow.is-fwd[data-v-8c4f21b8]{stroke:var(--dl-accent)}.dl-mnist__onehot rect[data-v-8c4f21b8]{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1px}.dl-mnist__onehot rect.is-on[data-v-8c4f21b8]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-mnist__onehot text[data-v-8c4f21b8]{fill:var(--dl-body);font-size:7px}.dl-mnist__onehot text.is-on[data-v-8c4f21b8]{fill:var(--dl-accent-strong);font-weight:700}.dl-figure[data-v-8876733c]{flex-direction:column;display:flex}.dl-figure__title[data-v-8876733c]{margin-bottom:.8rem}.dl-figure__canvas[data-v-8876733c]{flex:auto;justify-content:center;align-items:center;min-height:0;display:flex}.dl-figure__canvas[data-v-8876733c] img,.dl-figure__canvas[data-v-8876733c] svg{object-fit:contain;max-width:100%;max-height:100%}.dl-figure__footer[data-v-8876733c]{justify-content:space-between;align-items:flex-end;gap:2rem;margin-top:.6rem;display:flex}.dl-figure__caption[data-v-8876733c]{font-size:var(--dl-fs-secondary);color:var(--dl-body)}.dl-figure__citation[data-v-8876733c]{font-size:var(--dl-fs-citation);color:var(--dl-muted);text-align:right;flex-shrink:0}
|
lecture-02/assets/md-7lDxlpo1.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{O as e,St as t,V as n,_ as r,bt as i,tt as a,v as o}from"./modules/shiki-ZbpftOCw.js";import{n as s,t as c}from"./slidev/context-Dg_28hwb.js";import{t as l}from"./section-aKS-bwdz.js";var u={__name:`slides.md__slidev_3`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(n(),o(l,t(e(i(c)(i(_),2))),{default:a(()=>[...u[0]||=[r(`h1`,null,`Artificial neurons`,-1)]]),_:1},16))}};export{u as default};
|
lecture-02/assets/md-B3UgphXe2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{O as e,St as t,V as n,_ as r,bt as i,tt as a,v as o}from"./modules/shiki-ZbpftOCw.js";import{n as s,t as c}from"./slidev/context-Dg_28hwb.js";import{t as l}from"./section-aKS-bwdz.js";var u={__name:`slides.md__slidev_38`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(n(),o(l,t(e(i(c)(i(_),37))),{default:a(()=>[...u[0]||=[r(`h1`,null,`Implementing a multilayer ANN from scratch`,-1)]]),_:1},16))}};export{u as default};
|
lecture-02/assets/md-B7lGhEuR.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{K as e,O as t,St as n,V as r,_ as i,b as a,bt as o,nt as s,tt as c,v as l,w as u}from"./modules/shiki-ZbpftOCw.js";import{n as d,t as f}from"./slidev/context-Dg_28hwb.js";import{t as p}from"./slidev/VClicks-l0jZV8Zg.js";import{t as m}from"./default-C3zMja2v.js";import{t as h}from"./Citation-C2mQSZCj.js";var g={class:`mt-8`},_={__name:`slides.md__slidev_2`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=d();return b.setup(),(d,_)=>{let v=p,y=h,b=e(`click`);return r(),l(m,n(t(o(f)(o(w),1))),{default:c(()=>[_[1]||=i(`h1`,null,`Outline`,-1),u(v,null,{default:c(()=>[..._[0]||=[i(`ul`,null,[i(`li`,null,`Artificial neurons and neural networks`),i(`li`,null,`Implementing and training a multilayer neural network from scratch`)],-1)]]),_:1}),s((r(),a(`div`,g,[u(y,{source:`Based throughout on Raschka, Liu & Mirjalili — Machine Learning with PyTorch and Scikit-Learn`})])),[[b]])]),_:1},16)}}};export{_ as default};
|
lecture-02/assets/md-B8SnQrGe.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,O as t,St as n,V as r,_ as i,bt as a,tt as o,v as s,w as c}from"./modules/shiki-ZbpftOCw.js";import{n as l,t as u}from"./slidev/context-Dg_28hwb.js";import{t as d}from"./interactive--xmYYvz-.js";import{t as f}from"./MLPDiagram-BzsWpYDE.js";var p={__name:`slides.md__slidev_39`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=f;return r(),s(d,n(t(a(u)(a(b),38))),{aside:o(t=>[...p[0]||=[i(`p`,null,[e(`Connect single neurons into a `),i(`strong`,null,`multilayer feedforward`),e(` network: every unit is joined to `),i(`strong`,null,`every`),e(` unit of the next layer.`)],-1),i(`p`,null,[e(`Each link carries one `),i(`strong`,null,`weight`),e(`; each unit adds one `),i(`strong`,null,`bias`),e(` (dashed).`)],-1),i(`p`,null,[e(`More than one hidden layer makes it `),i(`strong`,null,`deep`),e(` — and training those needs special algorithms, which is where `),i(`em`,null,`deep learning`),e(` comes from.`)],-1)]]),default:o(()=>[c(m,{mode:`links`,layers:[3,4,2],width:600,height:330})]),_:1},16)}}};export{p as default};
|
lecture-02/assets/md-BBQmf_mI2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";var g={class:`grid grid-cols-[1.45fr_1fr] gap-5 mt-1 items-start`},_={class:`dl-ledger dl-tight dl-eq-legend`},v={class:`mt-3 dl-secondary`},y={viewBox:`0 0 300 150`,style:{width:`100%`,"max-width":`19rem`,height:`auto`},role:`img`,"aria-label":`Worked example: the learning rate falls from 0.1 at iteration 0 to 0.05 at iteration 10, 0.02 at 40 and 0.01 at 90`},b={class:`dl-callout`},x={__name:`slides.md__slidev_35`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=m,C=t(`click`);return i(),u(h,r(n(s(p)(s(O),34))),{default:l(()=>[x[4]||=a(`h1`,null,`Reading the equation: a shrinking learning rate`,-1),a(`div`,g,[a(`div`,_,[d(S,null,{default:l(()=>[...x[0]||=[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`what it is here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`η`)]),a(`annotation`,{encoding:`application/x-tex`},`\\eta`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])])])]),a(`td`,null,`learning rate`),a(`td`,null,`step size; now it gets smaller as training goes on`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0.1`),a(`mo`,null,`→`),a(`mn`,null,`0.01`)]),a(`annotation`,{encoding:`application/x-tex`},`0.1 \\to 0.01`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`→`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.01`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`c`),a(`mn`,null,`1`)])]),a(`annotation`,{encoding:`application/x-tex`},`c_1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`c`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`constant`),a(`td`,null,`sets the size of the first steps (set by hand)`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`c`),a(`mn`,null,`2`)])]),a(`annotation`,{encoding:`application/x-tex`},`c_2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`c`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`constant`),a(`td`,null,[e(`delays the shrinking and keeps the first `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`η`)]),a(`annotation`,{encoding:`application/x-tex`},`\\eta`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])])]),e(` finite (set by hand)`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`10`)]),a(`annotation`,{encoding:`application/x-tex`},`10`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`10`)])])])])]),a(`tr`,null,[a(`td`,null,`iterations`),a(`td`,null,`step counter`),a(`td`,null,[e(`updates made so far: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mo`,null,`…`)]),a(`annotation`,{encoding:`application/x-tex`},`0, 1, 2, \\ldots`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8389em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`minner`},`…`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`10`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`90`)]),a(`annotation`,{encoding:`application/x-tex`},`0,\\ 10,\\ 90`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8389em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`10`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`90`)])])])])])])],-1)]]),_:1}),c((i(),o(`div`,v,[...x[1]||=[e(` Why shrink it? Large early steps travel fast. Small late steps stop the noise of stochastic gradient descent from jumping around the minimum. `,-1)]])),[[C]])]),a(`div`,null,[(i(),o(`svg`,y,[...x[2]||=[a(`g`,{style:{stroke:`var(--dl-body)`,"stroke-width":`1.4`,fill:`none`}},[a(`polyline`,{points:`40,10 40,120 290,120`})],-1),a(`polyline`,{points:`40,20.0 45,36.7 50,48.6 55,57.5 60,64.4 65,70.0 75,78.3 85,84.3 100,90.6 115,95.0 140,100.0 165,103.3 190,105.7 227.5,108.2 265,110.0`,style:{fill:`none`,stroke:`var(--dl-accent)`,"stroke-width":`2`}},null,-1),a(`g`,{style:{fill:`var(--dl-accent)`}},[a(`circle`,{cx:`40`,cy:`20`,r:`4`}),a(`circle`,{cx:`65`,cy:`70`,r:`4`}),a(`circle`,{cx:`140`,cy:`100`,r:`4`}),a(`circle`,{cx:`265`,cy:`110`,r:`4`})],-1),a(`g`,{style:{fill:`var(--dl-heading)`,"font-size":`12px`}},[a(`text`,{x:`48`,y:`18`},`0.1`),a(`text`,{x:`72`,y:`66`},`0.05`),a(`text`,{x:`146`,y:`96`},`0.02`),a(`text`,{x:`252`,y:`104`,"text-anchor":`end`},`0.01`)],-1),a(`g`,{style:{fill:`var(--dl-muted)`,"font-size":`11px`},"text-anchor":`middle`},[a(`text`,{x:`40`,y:`136`},`0`),a(`text`,{x:`65`,y:`136`},`10`),a(`text`,{x:`140`,y:`136`},`40`),a(`text`,{x:`265`,y:`136`},`90`),a(`text`,{x:`165`,y:`149`},`iterations`),a(`text`,{x:`20`,y:`70`,transform:`rotate(-90 20 70)`},`η`)],-1)]])),c((i(),o(`div`,b,[...x[3]||=[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`c`),a(`mn`,null,`1`)]),a(`mo`,null,`=`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`c_1 = 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`c`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`c`),a(`mn`,null,`2`)]),a(`mo`,null,`=`),a(`mn`,null,`10`)]),a(`annotation`,{encoding:`application/x-tex`},`c_2 = 10`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`c`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`10`)])])]),e(`:`)],-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`η`),a(`mo`,null,`=`),a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`10`)])])]),a(`mo`,null,`=`),a(`mn`,null,`0.1`),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`1em`}),a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`10`),a(`mo`,null,`+`),a(`mn`,null,`10`)])])]),a(`mo`,null,`=`),a(`mn`,null,`0.05`),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`1em`}),a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`90`),a(`mo`,null,`+`),a(`mn`,null,`10`)])])]),a(`mo`,null,`=`),a(`mn`,null,`0.01`)]),a(`annotation`,{encoding:`application/x-tex`},`\\eta = \\tfrac{1}{0 + 10} = 0.1, \\quad \\tfrac{1}{10 + 10} = 0.05, \\quad \\tfrac{1}{90 + 10} = 0.01`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2484em`,"vertical-align":`-0.4033em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8451em`}},[a(`span`,{style:{top:`-2.655em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`0`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`10`)])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.394em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.4033em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2484em`,"vertical-align":`-0.4033em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8451em`}},[a(`span`,{style:{top:`-2.655em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`10`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`10`)])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.394em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.4033em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2484em`,"vertical-align":`-0.4033em`}}),a(`span`,{class:`mord`},`0.05`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8451em`}},[a(`span`,{style:{top:`-2.655em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`90`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`10`)])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.394em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.4033em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.01`)])])])],-1)]])),[[C]])])])]),_:1},16)}}};export{x as default};
|
lecture-02/assets/md-BF3AqBlu.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";var g={class:`grid grid-cols-[1.45fr_1fr] gap-5 mt-1 items-start`},_={class:`dl-ledger dl-tight dl-eq-legend`},v={viewBox:`0 0 300 150`,style:{width:`100%`,"max-width":`19rem`,height:`auto`},role:`img`,"aria-label":`Worked example: flower 1 has inputs 5.1 and 1.4; the error is minus 1; times the learning rate 0.1 gives weight changes minus 0.51 and minus 0.14`},y={class:`dl-callout`},b={__name:`slides.md__slidev_14`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=t(`click`);return i(),u(h,r(n(s(p)(s(D),13))),{default:l(()=>[b[3]||=a(`h1`,null,`Reading the equation: the perceptron update`,-1),a(`div`,g,[a(`div`,_,[d(x,null,{default:l(()=>[...b[0]||=[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`what it is here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`i`)]),a(`annotation`,{encoding:`application/x-tex`},`i`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6595em`}}),a(`span`,{class:`mord mathnormal`},`i`)])])])]),a(`td`,null,`example index`),a(`td`,null,[e(`which flower, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(` to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`n`)]),a(`annotation`,{encoding:`application/x-tex`},`n`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`n`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`j`)]),a(`annotation`,{encoding:`application/x-tex`},`j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])])]),a(`td`,null,`feature index`),a(`td`,null,[e(`which input, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(` to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`m`)]),a(`annotation`,{encoding:`application/x-tex`},`m`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`m`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`1,\\ 2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8389em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`2`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])]),a(`td`,null,[e(`feature `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`j`)]),a(`annotation`,{encoding:`application/x-tex`},`j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])]),e(` of example `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`i`)]),a(`annotation`,{encoding:`application/x-tex`},`i`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6595em`}}),a(`span`,{class:`mord mathnormal`},`i`)])])])]),a(`td`,null,`measurement (data)`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`5.1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`1.4`)]),a(`annotation`,{encoding:`application/x-tex`},`5.1,\\ 1.4`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8389em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`5.1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`1.4`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`y^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`true label`),a(`td`,null,[e(`setosa `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),e(`, versicolor `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(` (data)`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y}^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`predicted label`),a(`td`,null,[e(`the neuron’s output `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z^{(i)})`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.138em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`y^{(i)} - \\hat{y}^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`error`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),e(` if right, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`±`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pm 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`±`),a(`span`,{class:`mord`},`1`)])])]),e(` if wrong`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`-1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`η`)]),a(`annotation`,{encoding:`application/x-tex`},`\\eta`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`)])])])]),a(`td`,null,`learning rate`),a(`td`,null,`step size (set by hand)`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0.1`)]),a(`annotation`,{encoding:`application/x-tex`},`0.1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.1`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j,\\ \\Delta b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9805em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`)])])])]),a(`td`,null,`update`),a(`td`,null,[e(`change added to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])]),a(`annotation`,{encoding:`application/x-tex`},`w_j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])]),e(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])])]),a(`td`)])])],-1)]]),_:1})]),a(`div`,null,[(i(),o(`svg`,v,[...b[1]||=[a(`g`,{style:{fill:`var(--dl-surface)`,stroke:`var(--dl-border)`,"stroke-width":`1.5`}},[a(`rect`,{x:`78`,y:`12`,width:`70`,height:`30`,rx:`3`}),a(`rect`,{x:`158`,y:`12`,width:`70`,height:`30`,rx:`3`})],-1),a(`g`,{style:{fill:`var(--dl-accent-soft)`,stroke:`var(--dl-accent)`,"stroke-width":`1.5`}},[a(`rect`,{x:`78`,y:`106`,width:`70`,height:`30`,rx:`3`}),a(`rect`,{x:`158`,y:`106`,width:`70`,height:`30`,rx:`3`})],-1),a(`g`,{style:{fill:`none`,stroke:`var(--dl-body)`,"stroke-width":`1.6`}},[a(`line`,{x1:`153`,y1:`46`,x2:`153`,y2:`98`}),a(`polyline`,{points:`147,92 153,100 159,92`})],-1),a(`g`,{style:{fill:`var(--dl-heading)`,"font-size":`13px`},"text-anchor":`middle`},[a(`text`,{x:`113`,y:`32`},`5.1`),a(`text`,{x:`193`,y:`32`},`1.4`),a(`text`,{x:`113`,y:`126`},`−0.51`),a(`text`,{x:`193`,y:`126`},`−0.14`)],-1),a(`g`,{style:{fill:`var(--dl-muted)`,"font-size":`11px`}},[a(`text`,{x:`70`,y:`31`,"text-anchor":`end`},`x⁽¹⁾`),a(`text`,{x:`70`,y:`125`,"text-anchor":`end`},`Δw`),a(`text`,{x:`166`,y:`76`},`× η(y − ŷ) = −0.1`),a(`text`,{x:`236`,y:`125`},`Δb = −0.1`)],-1)]])),c((i(),o(`div`,y,[...b[2]||=[a(`p`,null,[e(`All zeros: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`z`),a(`mo`,null,`=`),a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`z = 0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),e(`, so `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mo`,null,`=`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y} = 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(` — wrong.`)],-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mn`,null,`1`)]),a(`mo`,null,`=`),a(`mn`,null,`0.1`),a(`mo`,null,`×`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`×`),a(`mn`,null,`5.1`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`0.51`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_1 = 0.1 \\times (-1) \\times 5.1 = -0.51`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5.1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`0.51`)])])])],-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mn`,null,`2`)]),a(`mo`,null,`=`),a(`mn`,null,`0.1`),a(`mo`,null,`×`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`×`),a(`mn`,null,`1.4`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`0.14`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_2 = 0.1 \\times (-1) \\times 1.4 = -0.14`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.4`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`0.14`)])])])],-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mn`,null,`0.1`),a(`mo`,null,`×`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`0.1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = 0.1 \\times (-1) = -0.1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`0.1`)])])])],-1)]])),[[S]])])])]),_:1},16)}}};export{b as default};
|
lecture-02/assets/md-BLD5nLBc.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";import{t as g}from"./slidev/KaTexBlockWrapper-BOQji8kD.js";var _={class:`grid grid-cols-2 gap-10 mt-2`},v={class:`mt-4 dl-callout`},y={__name:`slides.md__slidev_13`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=f();return S.setup(),(f,y)=>{let b=m,x=g,S=t(`click`);return i(),u(h,r(n(s(p)(s(E),12))),{default:l(()=>[y[4]||=a(`h1`,null,`The perceptron learning rule`,-1),a(`div`,_,[a(`div`,null,[d(b,null,{default:l(()=>[...y[0]||=[a(`ol`,null,[a(`li`,null,[e(`Initialise `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),e(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])]),e(` to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),e(` or small random numbers.`)]),a(`li`,null,[e(`For each training example `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`x`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])]),e(`: `),a(`ul`,null,[a(`li`,null,[e(`compute the output `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y}^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`li`,null,[e(`update `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),e(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])])])])])],-1)]]),_:1})]),a(`div`,null,[d(x,{ranges:[]},{default:l(()=>[...y[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j = \\eta\\,\\bigl(y^{(i)} - \\hat{y}^{(i)}\\bigr)\\,x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])])],-1)]]),_:1}),d(x,{ranges:[]},{default:l(()=>[...y[2]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`msup`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = \\eta\\,\\bigl(y^{(i)} - \\hat{y}^{(i)}\\bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)])])])])])],-1)]]),_:1}),c((i(),o(`div`,v,[...y[3]||=[a(`p`,null,[e(`Note there is `),a(`strong`,null,`no`),e(),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`x`)]),a(`annotation`,{encoding:`application/x-tex`},`x`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`x`)])])]),e(` in the bias update — the bias has no input to scale it.`)],-1)]])),[[S]])])])]),_:1},16)}}};export{y as default};
|
lecture-02/assets/md-BNoRCXVZ.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";import{t as g}from"./Katex-bEnhXSDx.js";import{t as _}from"./Citation-C2mQSZCj.js";var v={class:`grid grid-cols-[1.5fr_1fr] gap-7 mt-1`},y={class:`dl-iris-table`},b={class:`mt-6`},x={class:`dl-tight`},S={class:`mt-3 dl-callout`},C={__name:`slides.md__slidev_7`,setup(C){let{$slidev:w,$nav:T,$clicksContext:E,$clicks:D,$page:O,$renderContext:k,$frontmatter:A}=f();return E.setup(),(f,C)=>{let w=g,T=_,E=m,D=t(`click`);return i(),u(h,r(n(s(p)(s(A),6))),{default:l(()=>[C[14]||=a(`h1`,null,`What one row actually contains`,-1),a(`div`,v,[a(`div`,null,[a(`table`,y,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,[d(w,{expr:`i`})]),a(`th`,null,[d(w,{expr:`x_1`}),C[0]||=a(`br`,null,null,-1),C[1]||=a(`span`,null,`sepal length`,-1)]),a(`th`,null,[d(w,{expr:`x_2`}),C[2]||=a(`br`,null,null,-1),C[3]||=a(`span`,null,`sepal width`,-1)]),a(`th`,null,[d(w,{expr:`x_3`}),C[4]||=a(`br`,null,null,-1),C[5]||=a(`span`,null,`petal length`,-1)]),a(`th`,null,[d(w,{expr:`x_4`}),C[6]||=a(`br`,null,null,-1),C[7]||=a(`span`,null,`petal width`,-1)]),a(`th`,null,[d(w,{expr:`y`})]),C[8]||=a(`th`,null,`class`,-1)])]),C[9]||=a(`tbody`,null,[a(`tr`,null,[a(`td`,null,`1`),a(`td`,null,`5.1`),a(`td`,null,`3.5`),a(`td`,null,`1.4`),a(`td`,null,`0.2`),a(`td`,null,`0`),a(`td`,null,[a(`em`,null,`setosa`)])]),a(`tr`,null,[a(`td`,null,`2`),a(`td`,null,`4.9`),a(`td`,null,`3.0`),a(`td`,null,`1.4`),a(`td`,null,`0.2`),a(`td`,null,`0`),a(`td`,null,[a(`em`,null,`setosa`)])]),a(`tr`,{class:`is-gap`},[a(`td`,null,`⋮`),a(`td`),a(`td`),a(`td`),a(`td`),a(`td`),a(`td`)]),a(`tr`,null,[a(`td`,null,`51`),a(`td`,null,`7.0`),a(`td`,null,`3.2`),a(`td`,null,`4.7`),a(`td`,null,`1.4`),a(`td`,null,`1`),a(`td`,null,[a(`em`,null,`versicolor`)])]),a(`tr`,null,[a(`td`,null,`52`),a(`td`,null,`6.4`),a(`td`,null,`3.2`),a(`td`,null,`4.5`),a(`td`,null,`1.5`),a(`td`,null,`1`),a(`td`,null,[a(`em`,null,`versicolor`)])]),a(`tr`,{class:`is-gap`},[a(`td`,null,`⋮`),a(`td`),a(`td`),a(`td`),a(`td`),a(`td`),a(`td`)]),a(`tr`,null,[a(`td`,null,`101`),a(`td`,null,`6.3`),a(`td`,null,`3.3`),a(`td`,null,`6.0`),a(`td`,null,`2.5`),a(`td`,null,`2`),a(`td`,null,[a(`em`,null,`virginica`)])]),a(`tr`,null,[a(`td`,null,`102`),a(`td`,null,`5.8`),a(`td`,null,`2.7`),a(`td`,null,`5.1`),a(`td`,null,`1.9`),a(`td`,null,`2`),a(`td`,null,[a(`em`,null,`virginica`)])])],-1)]),C[10]||=a(`div`,{class:`mt-2 dl-secondary`},`All four measurements in centimetres.`,-1),a(`div`,b,[d(T,{source:`Fisher (1936), via the UCI Machine Learning Repository`,url:`https://archive.ics.uci.edu/dataset/53/iris`})])]),a(`div`,null,[C[13]||=a(`h3`,null,`The target variable`,-1),a(`div`,x,[d(E,null,{default:l(()=>[...C[11]||=[a(`ul`,null,[a(`li`,null,[e(`The file stores the class as `),a(`strong`,null,`text`),e(`: `),a(`code`,null,`Iris-setosa`),e(`, `),a(`code`,null,`Iris-versicolor`),e(`, `),a(`code`,null,`Iris-virginica`),e(`. It has to be encoded before any arithmetic.`)]),a(`li`,null,[e(`We map those to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),e(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])]),e(` — but that order is `),a(`strong`,null,`arbitrary`),e(`. The classes are nominal; nothing says versicolor lies between the other two.`)]),a(`li`,null,[e(`Today’s neuron is `),a(`strong`,null,`binary`),e(`, so we take setosa vs versicolor, two of the four features, and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`y`),a(`mo`,null,`∈`),a(`mo`,{stretchy:`false`},`{`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`}`)]),a(`annotation`,{encoding:`application/x-tex`},`y \\in \\{0, 1\\}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7335em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∈`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`{`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`}`)])])]),e(`.`)])],-1)]]),_:1}),c((i(),o(`div`,S,[...C[12]||=[e(` Three classes need three output units — `,-1),a(`strong`,null,`one-hot`,-1),e(` encoding. Later today. `,-1)]])),[[D]])])])])]),_:1},16)}}};export{C as default};
|
lecture-02/assets/md-BYiXaZfk.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-neuron[data-v-b825edcd]{width:100%;height:100%}.head[data-v-b825edcd]{fill:var(--dl-muted);letter-spacing:.1em;text-transform:uppercase;font-size:11px}.divider[data-v-b825edcd]{stroke:var(--dl-border);stroke-width:1px;stroke-dasharray:4 4}.bio>g[data-v-b825edcd],.art>g[data-v-b825edcd]{cursor:pointer}.process[data-v-b825edcd]{stroke:var(--dl-muted);fill:none;stroke-linecap:round;transition:stroke .2s}.axon[data-v-b825edcd]{stroke:var(--dl-muted);stroke-width:4px;stroke-linecap:round;transition:stroke .2s}.myelin[data-v-b825edcd]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.6px;transition:fill .2s,stroke .2s}.soma[data-v-b825edcd]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:2px;transition:fill .2s,stroke .2s}.nucleus[data-v-b825edcd]{fill:var(--dl-border);stroke:var(--dl-muted);stroke-width:1.2px}.nucleolus[data-v-b825edcd]{fill:var(--dl-muted)}.hillock[data-v-b825edcd],.bouton[data-v-b825edcd]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.6px;transition:fill .2s,stroke .2s}.ghost[data-v-b825edcd]{fill:none;stroke:var(--dl-border);stroke-width:3px}.wire[data-v-b825edcd]{stroke:var(--dl-muted);stroke-width:1.6px;fill:none;transition:stroke .2s,stroke-width .2s}.unit[data-v-b825edcd]{fill:var(--dl-surface);stroke:var(--dl-muted);stroke-width:1.6px;transition:fill .2s,stroke .2s}.unit.is-op[data-v-b825edcd]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.glyph[data-v-b825edcd]{fill:none;stroke:var(--dl-accent-strong);stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.is-on .process[data-v-b825edcd]{stroke:var(--dl-accent)}.is-on .axon[data-v-b825edcd],.is-on .wire[data-v-b825edcd]{stroke:var(--dl-accent);stroke-width:3px}.is-on .soma[data-v-b825edcd],.is-on .hillock[data-v-b825edcd],.is-on .myelin[data-v-b825edcd],.is-on .bouton[data-v-b825edcd],.is-on .unit[data-v-b825edcd]{fill:var(--dl-accent);stroke:var(--dl-accent-strong)}.is-on .nucleus[data-v-b825edcd]{fill:var(--dl-accent-soft)}.is-on .nucleolus[data-v-b825edcd]{fill:var(--dl-accent-strong)}.is-on .glyph[data-v-b825edcd]{stroke:#fff}.lbl[data-v-b825edcd]{fill:var(--dl-muted);pointer-events:none;font-size:11px}.lbl.is-tiny[data-v-b825edcd]{font-size:9px}.lbl.is-ghost[data-v-b825edcd]{fill:var(--dl-border)}.is-on .lbl[data-v-b825edcd]{fill:var(--dl-accent-strong);font-weight:600}.leader[data-v-b825edcd]{stroke:var(--dl-border);stroke-width:1px}.val[data-v-b825edcd]{fill:var(--dl-heading);text-anchor:middle;pointer-events:none;font-size:12px}.val.is-small[data-v-b825edcd]{fill:var(--dl-muted);font-size:10.5px}.val.is-big[data-v-b825edcd]{font-size:19px}.is-on .val[data-v-b825edcd]{fill:#fff}.is-on .val.is-small[data-v-b825edcd]{fill:var(--dl-accent-strong);font-weight:600}.dl-neuron__tabs[data-v-b825edcd]{flex-wrap:wrap;gap:.35rem;display:flex}.dl-neuron__tabs button[data-v-b825edcd]{border:1px solid var(--dl-border);font:inherit;color:var(--dl-body);cursor:pointer;background:0 0;border-radius:6px;padding:.28rem .7rem;font-size:.78rem}.dl-neuron__tabs button.is-active[data-v-b825edcd]{background:var(--dl-accent);border-color:var(--dl-accent);color:#fff;font-weight:600}.dl-neuron__map[data-v-b825edcd],.dl-neuron__breaks[data-v-b825edcd]{margin:0;line-height:1.45}.dl-neuron__breaks[data-v-b825edcd]{margin-top:.2rem}.dl-neuron__flag[data-v-b825edcd]{color:var(--dl-danger);text-transform:uppercase;letter-spacing:.06em;margin-right:.35rem;font-size:.7rem;font-weight:600}
|
lecture-02/assets/md-Bb3RBvlb.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";var g={class:`mt-8 dl-callout`},_={__name:`slides.md__slidev_31`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=f();return b.setup(),(f,_)=>{let v=m,y=t(`click`);return i(),u(h,r(n(s(p)(s(w),30))),{default:l(()=>[_[2]||=a(`h1`,null,`Why Adaline`,-1),d(v,null,{default:l(()=>[..._[0]||=[a(`ul`,null,[a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`)])])]),e(` produces a `),a(`strong`,null,`real number`),e(`, not an integer class label. There is a gradient to follow.`)]),a(`li`,null,[e(`The weight update is computed from `),a(`strong`,null,`all`),e(` examples at once — full-batch gradient descent — rather than one at a time.`)])],-1)]]),_:1}),c((i(),o(`div`,g,[..._[1]||=[e(` Both of those become problems at scale. The two fixes come next: feature scaling, then stochastic gradient descent. `,-1)]])),[[y]])]),_:1},16)}}};export{_ as default};
|
lecture-02/assets/md-BdLjP6lQ.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./interactive--xmYYvz-.js";import{t as g}from"./MLPDiagram-BzsWpYDE.js";var _={class:`mt-3 dl-secondary`},v={__name:`slides.md__slidev_41`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=g,b=m,x=t(`click`);return i(),u(h,r(n(s(p)(s(T),40))),{aside:l(t=>[d(b,null,{default:l(()=>[...v[0]||=[a(`ol`,null,[a(`li`,null,[a(`strong`,null,`Forward-propagate`),e(` the training patterns`)]),a(`li`,null,[a(`strong`,null,`Calculate the loss`)]),a(`li`,null,[a(`strong`,null,`Backpropagate`),e(` it, finding the derivative with respect to every weight and bias`)]),a(`li`,null,[a(`strong`,null,`Update`),e(` them`)])],-1)]]),_:1}),c((i(),o(`div`,_,[...v[1]||=[e(` And all of it is wasted unless the activations are `,-1),a(`strong`,null,`non-linear`,-1),e(`. Next slide: why. `,-1)]])),[[x]])]),default:l(()=>[d(y)]),_:1},16)}}};export{v as default};
|
lecture-02/assets/md-Bdar9RKb.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,O as n,St as r,V as i,_ as a,b as o,bt as s,ft as c,g as l,tt as u,v as d,w as f,wt as p}from"./modules/shiki-ZbpftOCw.js";import{t as m}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as h,t as g}from"./slidev/context-Dg_28hwb.js";import{t as _}from"./slidev/KaTexBlockWrapper-BOQji8kD.js";import{n as v,t as y}from"./interactive--xmYYvz-.js";import{t as b}from"./Katex-bEnhXSDx.js";import{t as x}from"./StepButton-DiDduF86.js";import{n as S,t as C}from"./PlotPoints-BmurSwXE.js";import{t as w}from"./useRandom-CKuF3nnJ.js";var T={class:`dl-fs__formula`},E={key:0},D={key:1},O={class:`dl-fs__warn`},k=m(t({__name:`FeatureScaling`,props:{points:{default:40},seed:{default:20260202}},setup(t){let{$slidev:n,$nav:r,$clicksContext:s,$clicks:m,$page:g,$renderContext:_,$frontmatter:y}=h(),k=t,A=c(!1),j=l(()=>{let e=w(k.seed);return Array.from({length:k.points},()=>({x:4.6+e()*.8,y:138+e()*26}))});function M(e){let t=e.reduce((e,t)=>e+t,0)/e.length,n=e.reduce((e,n)=>e+(n-t)**2,0)/e.length;return{mean:t,sd:Math.sqrt(n)||1}}let N=l(()=>M(j.value.map(e=>e.x))),P=l(()=>M(j.value.map(e=>e.y))),F=l(()=>A.value?j.value.map(e=>({x:(e.x-N.value.mean)/N.value.sd,y:(e.y-P.value.mean)/P.value.sd})):j.value),I=l(()=>A.value?[-3,3]:[2,7]),L=l(()=>A.value?[-3,3]:[60,220]);return(t,n)=>{let r=C,s=S,c=x,l=b,m=v;return i(),d(m,{"max-width":`40rem`},{controls:u(()=>[f(c,{label:A.value?`Show raw features`:`Standardise`,variant:A.value?`ghost`:`primary`,onClick:n[0]||=e=>A.value=!A.value},null,8,[`label`,`variant`])]),readout:u(()=>[a(`div`,T,[f(l,{expr:`x_j' = \\dfrac{x_j - \\mu_j}{\\sigma_j}`})]),A.value?(i(),o(`div`,E,` Both features now have mean 0 and standard deviation 1 — one shared step size fits both. `)):(i(),o(`div`,D,[e(` μ₁ = `+p(N.value.mean.toFixed(2))+`, σ₁ = `+p(N.value.sd.toFixed(2))+` · μ₂ = `+p(P.value.mean.toFixed(1))+`, σ₂ = `+p(P.value.sd.toFixed(1))+` — `,1),a(`span`,O,`x₂ varies ~`+p(Math.round(P.value.sd/N.value.sd))+`× more, so it dominates every gradient step.`,1)]))]),default:u(()=>[f(s,{"x-domain":I.value,"y-domain":L.value,width:440,height:300,"x-label":A.value?`x₁ (standardised)`:`x₁ — petal length (cm)`,"y-label":A.value?`x₂ (standardised)`:`x₂ (mm)`},{default:u(()=>[f(r,{points:F.value,radius:5,color:`var(--dl-accent)`,opacity:.85},null,8,[`points`])]),_:1},8,[`x-domain`,`y-domain`,`x-label`,`y-label`])]),_:1})}}}),[[`__scopeId`,`data-v-6e8ef72c`]]),A={__name:`slides.md__slidev_32`,setup(t){let{$slidev:o,$nav:c,$clicksContext:l,$clicks:p,$page:m,$renderContext:v,$frontmatter:b}=h();return l.setup(),(t,o)=>{let c=k,l=_;return i(),d(y,r(n(s(g)(s(b),31))),{aside:u(t=>[f(l,{ranges:[]},{default:u(()=>[...o[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,null,`=`),a(`mfrac`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`)]),a(`mo`,null,`−`),a(`msub`,null,[a(`mi`,null,`μ`),a(`mi`,null,`j`)])]),a(`msub`,null,[a(`mi`,null,`σ`),a(`mi`,null,`j`)])])]),a(`annotation`,{encoding:`application/x-tex`},`x_j' = \\frac{x_j - \\mu_j}{\\sigma_j}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.185em`,"vertical-align":`-0.3831em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-2.453em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3831em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.2324em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2603em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`μ`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1}),o[1]||=a(`p`,null,[e(`Each feature gets mean `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),e(` and standard deviation `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(`, so a single learning rate suits every weight.`)],-1)]),default:u(()=>[f(c)]),_:1},16)}}};export{A as default};
|
lecture-02/assets/md-BgkY7HbW.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{Ct as e,E as t,O as n,P as r,S as i,St as a,U as o,V as s,W as c,_ as l,b as u,bt as d,g as f,m as p,tt as m,v as h,w as g,wt as _,xt as v,y}from"./modules/shiki-ZbpftOCw.js";import{t as b}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as x,t as S}from"./slidev/context-Dg_28hwb.js";import{t as C}from"./DeckFooter-6-dHlE3F.js";import{t as w}from"./Citation-C2mQSZCj.js";var T=[`viewBox`,`aria-label`],E={class:`dl-mnist__label-path`},D={x:`52`,y:`57`,"text-anchor":`middle`,class:`dl-mnist__digit`},O={class:`dl-mnist__onehot`},k=[`x`,`y`,`width`,`height`],A=[`x`,`y`],j=[`x`,`y`],M={x:`178`,y:`60`,class:`dl-mnist__cap`},N={class:`dl-mnist__tile`},P=[`x`,`y`,`width`,`height`],F=[`x`,`y`,`width`,`height`],I=[`x`],L=[`x`],R=[`x`],z=[`x`],B=[`x`],V=[`x`],H=[`x`],U={x:`498`,y:`248`,class:`dl-mnist__count`},W={x:`498`,y:`262`,class:`dl-mnist__sub`},G=700,K=420,q=b(t({__name:`MnistPipeline`,props:{size:{default:28},hidden:{default:50},classes:{default:10},label:{default:7}},setup(t){let{$slidev:n,$nav:a,$clicksContext:c,$clicks:d,$page:m,$renderContext:h,$frontmatter:g}=x(),b=t,S=f(()=>b.size*b.size);function C(e,t,n,r,i,a){let o=i-n,s=a-r,c=o*o+s*s,l=c===0?0:Math.max(0,Math.min(1,((e-n)*o+(t-r)*s)/c));return Math.hypot(e-(n+l*o),t-(r+l*s))}let w=[[7.5,7,20,7],[20,7,11,22],[9.5,15,17,15]],q=f(()=>{let e=[];for(let t=0;t<b.size;t++)for(let n=0;n<b.size;n++){let r=1/0;for(let[e,i,a,o]of w)r=Math.min(r,C(n+.5,t+.5,e,i,a,o));let i=Math.max(0,Math.min(1,1.6-r));i>.02&&e.push({x:n,y:t,v:i})}return e}),J={x:24,y:196,size:96},Y=f(()=>J.size/b.size),X={input:{x:196,y:150,width:14,height:190},hidden:{x:312,y:178,width:14,height:134},output:{x:424,y:200,width:14,height:90}},Z={x:150,y:8,w:20,cell:9},Q=f(()=>Array.from({length:b.classes},(e,t)=>({i:t,y:Z.y+t*Z.cell,on:t===b.label})));return(t,n)=>(s(),u(`svg`,{class:`dl-mnist`,viewBox:`0 0 ${G} ${K}`,preserveAspectRatio:`xMidYMid meet`,role:`img`,"aria-label":`An MNIST image of ${b.label} reshaped to ${S.value} inputs, through a hidden layer of ${b.hidden} units to ${b.classes} outputs`},[n[5]||=i(`<defs data-v-8c4f21b8><marker id="dl-mnist-arrow" markerWidth="8" markerHeight="8" refX="7" refY="3.2" orient="auto" data-v-8c4f21b8><path d="M0,0 L7,3.2 L0,6.4 z" class="dl-mnist__head" data-v-8c4f21b8></path></marker><marker id="dl-mnist-arrow-fwd" markerWidth="8" markerHeight="8" refX="7" refY="3.2" orient="auto" data-v-8c4f21b8><path d="M0,0 L7,3.2 L0,6.4 z" class="dl-mnist__head is-fwd" data-v-8c4f21b8></path></marker><marker id="dl-mnist-arrow-back" markerWidth="8" markerHeight="8" refX="7" refY="3.2" orient="auto" data-v-8c4f21b8><path d="M0,0 L7,3.2 L0,6.4 z" class="dl-mnist__head is-back" data-v-8c4f21b8></path></marker></defs>`,1),y(` The label path: 7 -> one-hot target vector. `),l(`g`,E,[n[0]||=l(`rect`,{x:`35`,y:`33`,width:`34`,height:`34`,rx:`3`,class:`dl-mnist__box`},null,-1),l(`text`,D,_(b.label),1),n[1]||=l(`text`,{x:`52`,y:`86`,"text-anchor":`middle`,class:`dl-mnist__cap`},`class label`,-1),n[2]||=l(`line`,{x1:`78`,y1:`50`,x2:`138`,y2:`50`,"marker-end":`url(#dl-mnist-arrow)`,class:`dl-mnist__arrow`},null,-1),n[3]||=l(`text`,{x:`108`,y:`41`,"text-anchor":`middle`,class:`dl-mnist__op`},`encode`,-1),l(`g`,O,[(s(!0),u(p,null,o(Q.value,e=>(s(),u(p,{key:e.i},[l(`rect`,{x:Z.x,y:e.y,width:Z.w,height:Z.cell,class:v({"is-on":e.on})},null,10,k),l(`text`,{x:Z.x+Z.w/2,y:e.y+Z.cell-2.2,"text-anchor":`middle`,class:v({"is-on":e.on})},_(+!!e.on),11,A),l(`text`,{x:Z.x-4,y:e.y+Z.cell-2.2,"text-anchor":`end`,class:`dl-mnist__idx`},_(e.i),9,j)],64))),128))]),n[4]||=l(`text`,{x:`178`,y:`46`,class:`dl-mnist__cap`},`one-hot target,`,-1),l(`text`,M,_(b.classes)+` entries`,1)]),y(` The two directions the same graph is walked in. `),n[6]||=l(`line`,{x1:`440`,y1:`118`,x2:`176`,y2:`118`,"marker-end":`url(#dl-mnist-arrow-back)`,class:`dl-mnist__arrow is-back`},null,-1),n[7]||=l(`text`,{x:`308`,y:`110`,"text-anchor":`middle`,class:`dl-mnist__code is-back`},`.backward() — loss back to every weight`,-1),n[8]||=l(`line`,{x1:`196`,y1:`392`,x2:`440`,y2:`392`,"marker-end":`url(#dl-mnist-arrow-fwd)`,class:`dl-mnist__arrow is-fwd`},null,-1),n[9]||=l(`text`,{x:`318`,y:`408`,"text-anchor":`middle`,class:`dl-mnist__code`},`.forward() — image to probabilities`,-1),y(` The data path: image -> 784 -> 50 -> 10. `),l(`g`,N,[l(`rect`,{x:J.x,y:J.y,width:J.size,height:J.size,class:`dl-mnist__box`},null,8,P),(s(!0),u(p,null,o(q.value,(t,n)=>(s(),u(`rect`,{key:n,x:J.x+t.x*Y.value,y:J.y+t.y*Y.value,width:Y.value+.4,height:Y.value+.4,class:`dl-mnist__ink`,style:e({opacity:t.v})},null,12,F))),128))]),l(`text`,{x:J.x+J.size/2,y:`312`,"text-anchor":`middle`,class:`dl-mnist__cap`},_(b.size)+` × `+_(b.size)+` greyscale image `,9,I),n[10]||=l(`line`,{x1:`128`,y1:`244`,x2:`182`,y2:`244`,"marker-end":`url(#dl-mnist-arrow)`,class:`dl-mnist__arrow`},null,-1),n[11]||=l(`text`,{x:`155`,y:`234`,"text-anchor":`middle`,class:`dl-mnist__op`},`reshape`,-1),l(`rect`,r(X.input,{class:`dl-mnist__bar`}),null,16),l(`text`,{x:X.input.x+7,y:`356`,"text-anchor":`middle`,class:`dl-mnist__cap`},_(S.value)+` inputs`,9,L),l(`text`,{x:X.input.x+7,y:`370`,"text-anchor":`middle`,class:`dl-mnist__sub`},`one per pixel`,8,R),n[12]||=l(`line`,{x1:`218`,y1:`244`,x2:`298`,y2:`244`,"marker-end":`url(#dl-mnist-arrow)`,class:`dl-mnist__arrow`},null,-1),n[13]||=l(`text`,{x:`258`,y:`222`,"text-anchor":`middle`,class:`dl-mnist__op`},`net input`,-1),n[14]||=l(`text`,{x:`258`,y:`234`,"text-anchor":`middle`,class:`dl-mnist__op`},`+ sigmoid`,-1),l(`rect`,r(X.hidden,{class:`dl-mnist__bar is-live`}),null,16),l(`text`,{x:X.hidden.x+7,y:`356`,"text-anchor":`middle`,class:`dl-mnist__cap`},`hidden layer`,8,z),l(`text`,{x:X.hidden.x+7,y:`370`,"text-anchor":`middle`,class:`dl-mnist__sub`},_(b.hidden)+` units`,9,B),n[15]||=l(`line`,{x1:`330`,y1:`244`,x2:`410`,y2:`244`,"marker-end":`url(#dl-mnist-arrow)`,class:`dl-mnist__arrow`},null,-1),n[16]||=l(`text`,{x:`370`,y:`222`,"text-anchor":`middle`,class:`dl-mnist__op`},`net input`,-1),n[17]||=l(`text`,{x:`370`,y:`234`,"text-anchor":`middle`,class:`dl-mnist__op`},`+ sigmoid`,-1),l(`rect`,r(X.output,{class:`dl-mnist__bar is-live`}),null,16),l(`text`,{x:X.output.x+7,y:`356`,"text-anchor":`middle`,class:`dl-mnist__cap`},`output layer`,8,V),l(`text`,{x:X.output.x+7,y:`370`,"text-anchor":`middle`,class:`dl-mnist__sub`},_(b.classes)+` units`,9,H),n[18]||=i(`<line x1="440" y1="208" x2="492" y2="178" class="dl-mnist__leader" data-v-8c4f21b8></line><text x="498" y="170" class="dl-mnist__cap" data-v-8c4f21b8>class-membership</text><text x="498" y="184" class="dl-mnist__cap" data-v-8c4f21b8>probabilities</text><text x="498" y="202" class="dl-mnist__sub" data-v-8c4f21b8>compared with the one-hot</text><text x="498" y="214" class="dl-mnist__sub" data-v-8c4f21b8>target to give the loss</text>`,5),l(`text`,U,_((S.value*b.hidden+b.hidden*b.classes).toLocaleString())+` weights `,1),l(`text`,W,` + `+_((b.hidden+b.classes).toLocaleString())+` biases — every one of them learned `,1)],8,T))}}),[[`__scopeId`,`data-v-8c4f21b8`]]),J={class:`slidev-layout dl-figure`},Y={key:0,class:`dl-figure__title`},X={class:`dl-figure__footer`},Z={class:`dl-figure__caption`},Q={class:`dl-figure__citation`},$=b(t({__name:`figure`,props:{heading:{},maxHeight:{}},setup(t){let{$slidev:n,$nav:r,$clicksContext:i,$clicks:a,$page:o,$renderContext:d,$frontmatter:f}=x(),p=t;return(t,n)=>{let r=C;return s(),u(`div`,J,[p.heading?(s(),u(`h1`,Y,_(p.heading),1)):y(`v-if`,!0),l(`div`,{class:`dl-figure__canvas`,style:e({maxHeight:p.maxHeight})},[c(t.$slots,`default`,{},void 0,!0)],4),l(`div`,X,[l(`div`,Z,[c(t.$slots,`caption`,{},void 0,!0)]),l(`div`,Q,[c(t.$slots,`citation`,{},void 0,!0)])]),g(r)])}}}),[[`__scopeId`,`data-v-8876733c`]]),ee={__name:`slides.md__slidev_44`,setup(e){let{$slidev:t,$nav:r,$clicksContext:i,$clicks:o,$page:c,$renderContext:u,$frontmatter:f}=x();return i.setup(),(e,t)=>{let r=q,i=w;return s(),h($,a(n(d(S)(d(f),43))),{caption:m(e=>[...t[0]||=[l(`p`,null,`The exercise for this week: an MLP (multilayer perceptron) on MNIST, written from scratch. Every box on this diagram is one of the pieces we built today.`,-1)]]),citation:m(e=>[g(i,{source:`After Raschka, Liu & Mirjalili, ch. 11`})]),default:m(()=>[g(r)]),_:1},16)}}};export{ee as default};
|
lecture-02/assets/md-BlW7fxDD.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.dl-iris[data-v-5dfd19a6]{align-items:stretch;gap:1.1rem;width:100%;min-width:0;display:flex}.dl-iris__photos[data-v-5dfd19a6]{flex:auto;gap:.6rem;min-width:0;display:flex}.dl-iris__card[data-v-5dfd19a6]{min-width:0;font:inherit;text-align:left;cursor:pointer;background:0 0;border:2px solid #0000;border-radius:8px;flex-direction:column;flex:1 1 0;align-items:stretch;gap:.2rem;padding:0;display:flex}.dl-iris__frame[data-v-5dfd19a6]{border:1px solid var(--dl-border);filter:saturate(.55)opacity(.7);border-radius:6px;transition:filter .2s,border-color .2s;display:block;overflow:hidden}.dl-iris__card.is-active .dl-iris__frame[data-v-5dfd19a6]{filter:none;border-color:var(--dl-accent)}.dl-iris__frame[data-v-5dfd19a6] img{aspect-ratio:4/5;object-fit:cover;width:100%;display:block}.dl-iris__name[data-v-5dfd19a6]{color:var(--dl-muted);font-size:.78rem;font-style:italic;line-height:1.25}.dl-iris__card.is-active .dl-iris__name[data-v-5dfd19a6]{color:var(--dl-heading);font-weight:600}.dl-iris__target[data-v-5dfd19a6]{color:var(--dl-muted);font-variant-numeric:tabular-nums;font-size:.72rem}.dl-iris__card.is-active .dl-iris__target[data-v-5dfd19a6]{color:var(--dl-accent);font-weight:600}.dl-iris__scale[data-v-5dfd19a6]{flex:0 0 15.5rem;align-self:center;max-height:100%}.ruler[data-v-5dfd19a6],.baseline[data-v-5dfd19a6]{stroke:var(--dl-border);stroke-width:1px}.baseline[data-v-5dfd19a6]{stroke-dasharray:3 3}.tick[data-v-5dfd19a6]{fill:var(--dl-muted);text-anchor:end;font-size:8px}.organ[data-v-5dfd19a6]{stroke-width:1.5px;transition:d .25s}.is-sepal .organ[data-v-5dfd19a6]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.is-petal .organ[data-v-5dfd19a6]{fill:var(--dl-accent);stroke:var(--dl-accent-strong)}.dim[data-v-5dfd19a6]{stroke:var(--dl-muted);stroke-width:1px}.dimlbl[data-v-5dfd19a6]{fill:var(--dl-muted);font-size:8.5px}.dimlbl.is-centred[data-v-5dfd19a6]{text-anchor:middle}.dimlbl .is-value[data-v-5dfd19a6]{fill:var(--dl-heading);font-size:9.5px;font-weight:600}.dl-iris__row[data-v-5dfd19a6]{flex-wrap:wrap;align-items:baseline;gap:.5rem;margin:0;display:flex}.dl-iris__units[data-v-5dfd19a6]{color:var(--dl-muted)}.dl-iris__credit[data-v-5dfd19a6]{color:var(--dl-muted);margin:.15rem 0 0;font-size:.72rem}
|
lecture-02/assets/md-Bt0SEe9U.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,O as n,St as r,U as i,V as a,W as o,_ as s,b as c,bt as l,ft as u,g as d,m as f,tt as p,v as m,w as h,wt as g,xt as _,y as v}from"./modules/shiki-ZbpftOCw.js";import{t as y}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b,t as ee}from"./slidev/context-Dg_28hwb.js";import{n as te,t as ne}from"./interactive--xmYYvz-.js";import{t as re}from"./Katex-bEnhXSDx.js";var ie={class:`dl-iris`},x={class:`dl-iris__photos`},S=[`onClick`],C={class:`dl-iris__frame`},w={class:`dl-iris__name`},T={class:`dl-iris__target`},E=[`aria-label`],D=[`y2`],O=[`x1`,`x2`,`y1`,`y2`],k=[`x`,`y`],A=[`x`,`y`],j=[`d`],M=[`x1`,`x2`,`y2`],N=[`x1`,`x2`],P=[`x1`,`y1`,`x2`,`y2`],F=[`x`,`y`],I=[`x`],ae=[`x`],L=[`x`],R=[`x1`,`y1`,`x2`,`y2`],z=[`x`,`y`],B=[`x`],V=[`x`],H={class:`dl-iris__row`},U={class:`dl-iris__units`},W={class:`dl-iris__row`},G={class:`dl-iris__units`},K={class:`dl-iris__credit`},q=22,J=176,Y=26,oe=y(t({__name:`IrisDataset`,setup(t){let{$slidev:n,$nav:r,$clicksContext:l,$clicks:y,$page:ee,$renderContext:ne,$frontmatter:oe}=b(),X=[{key:`setosa`,name:`Iris setosa`,target:0,row:8,x:[5,3.4,1.5,.2],credit:`Radomil, CC BY-SA 3.0`},{key:`versicolor`,name:`Iris versicolor`,target:1,row:100,x:[5.7,2.8,4.1,1.3],credit:`Dlanglois, CC BY-SA 3.0`},{key:`virginica`,name:`Iris virginica`,target:2,row:113,x:[6.8,3,5.5,2.1],credit:`Frank Mayfield, CC BY-SA 2.0`}],se=[`sepal length`,`sepal width`,`petal length`,`petal width`],Z=u(`setosa`),Q=d(()=>X.find(e=>e.key===Z.value)),ce=[0,1,2,3,4,5,6,7];function le(e,t,n){let r=t*q,i=Math.max(n*q,3),a=J-r;return[`M${e},${J}`,`C${e-i/2},${J-r*.22} ${e-i/2},${J-r*.72} ${e},${a}`,`C${e+i/2},${J-r*.72} ${e+i/2},${J-r*.22} ${e},${J}`,`Z`].join(` `)}let $=d(()=>[{key:`sepal`,cx:100,label:`sepal`,len:Q.value.x[0],wide:Q.value.x[1]},{key:`petal`,cx:198,label:`petal`,len:Q.value.x[2],wide:Q.value.x[3]}].map(e=>({...e,d:le(e.cx,e.len,e.wide),topY:J-e.len*q,midY:J-e.len*q*.47,halfW:Math.max(e.wide*q,3)/2})));return(t,n)=>{let r=re,l=te;return a(),m(l,{"max-width":`56rem`},{readout:p(()=>[s(`p`,H,[h(r,{expr:`\\mathbf{x}^{(${Q.value.row})} = [\\,${Q.value.x.map(e=>e.toFixed(1)).join(`,\\; `)}\\,]^\\top`},null,8,[`expr`]),s(`span`,U,`— `+g(se.join(`, `))+`, all in cm`,1)]),s(`p`,W,[h(r,{expr:`y^{(${Q.value.row})} = ${Q.value.target}`},null,8,[`expr`]),s(`span`,G,[n[0]||=e(`— the label for `,-1),s(`em`,null,g(Q.value.name),1),n[1]||=e(`, one of three classes, 50 examples each`,-1)])]),v(` All three photographs are share-alike licensed; the credit has to travel with them. `),s(`p`,K,`Photo: `+g(Q.value.credit)+`, via Wikimedia Commons`,1)]),default:p(()=>[s(`div`,ie,[s(`div`,x,[(a(),c(f,null,i(X,e=>s(`button`,{key:e.key,type:`button`,class:_([`dl-iris__card`,{"is-active":e.key===Z.value}]),onClick:t=>Z.value=e.key},[s(`span`,C,[o(t.$slots,e.key,{},void 0,!0)]),s(`span`,w,g(e.name),1),s(`span`,T,`y = `+g(e.target),1)],10,S)),64))]),(a(),c(`svg`,{viewBox:`0 0 292 210`,class:`dl-iris__scale`,role:`img`,"aria-label":`Sepal and petal of ${Q.value.name} drawn to scale`},[v(` centimetre ruler `),s(`line`,{x1:Y,y1:J,x2:Y,y2:22,class:`ruler`},null,8,D),(a(),c(f,null,i(ce,e=>(a(),c(f,{key:e},[s(`line`,{x1:22,x2:30,y1:J-e*q,y2:J-e*q,class:`ruler`},null,8,O),s(`text`,{x:19,y:J-e*q+3.5,class:`tick`},g(e),9,k)],64))),64)),s(`text`,{x:19,y:192,class:`tick`},`cm`,8,A),s(`line`,{x1:`40`,y1:J,x2:`284`,y2:J,class:`baseline`}),(a(!0),c(f,null,i($.value,e=>(a(),c(`g`,{key:e.key,class:_(`is-${e.key}`)},[s(`path`,{d:e.d,class:`organ`},null,8,j),v(` length: a dimension line from the baseline to the tip `),s(`line`,{x1:e.cx+34,y1:J,x2:e.cx+34,y2:e.topY,class:`dim`},null,8,M),s(`line`,{x1:e.cx+30,y1:J,x2:e.cx+38,y2:J,class:`dim`},null,8,N),s(`line`,{x1:e.cx+30,y1:e.topY,x2:e.cx+38,y2:e.topY,class:`dim`},null,8,P),s(`text`,{x:e.cx+41,y:(J+e.topY)/2,class:`dimlbl`},[s(`tspan`,{x:e.cx+41,dy:`-2`},g(e.label),9,I),s(`tspan`,{x:e.cx+41,dy:`12`},`length`,8,ae),s(`tspan`,{x:e.cx+41,dy:`12`,class:`is-value`},g(e.len.toFixed(1))+` cm`,9,L)],8,F),v(` width: a dimension line across the widest part `),s(`line`,{x1:e.cx-e.halfW,y1:e.midY,x2:e.cx+e.halfW,y2:e.midY,class:`dim`},null,8,R),s(`text`,{x:e.cx,y:e.midY-6,class:`dimlbl is-centred`},[s(`tspan`,{x:e.cx},`width`,8,B),s(`tspan`,{x:e.cx,dy:`12`,class:`is-value`},g(e.wide.toFixed(1))+` cm`,9,V)],8,z)],2))),128))],8,E))])]),_:3})}}}),[[`__scopeId`,`data-v-5dfd19a6`]]);``+new URL(`iris-setosa-CYyB8_KQ.jpg`,import.meta.url).href,``+new URL(`iris-versicolor-DED4EHyk.jpg`,import.meta.url).href,``+new URL(`iris-virginica-7D5qYfzB.jpg`,import.meta.url).href;var X={__name:`slides.md__slidev_6`,setup(t){let{$slidev:i,$nav:o,$clicksContext:c,$clicks:u,$page:d,$renderContext:f,$frontmatter:g}=b();return c.setup(),(t,i)=>{let o=oe;return a(),m(ne,r(n(l(ee)(l(g),5))),{aside:p(t=>[...i[3]||=[s(`p`,null,[s(`strong`,null,`Iris`),e(`, Fisher 1936. 150 flowers, 50 per species.`)],-1),s(`p`,null,[s(`strong`,null,`Sepals`),e(` are the outer, drooping parts. `),s(`strong`,null,`Petals`),e(` are the inner, upright ones.`)],-1),s(`p`,null,`Click a species: both are redrawn to scale from a real row.`,-1),s(`div`,{class:`mt-3 dl-callout`},` Petal length: 1.5 → 4.1 → 5.5 cm. That column does most of the work. `,-1)]]),default:p(()=>[h(o,null,{setosa:p(()=>[...i[0]||=[s(`img`,{src:``+new URL(`iris-setosa-CYyB8_KQ.jpg`,import.meta.url).href,alt:`Iris setosa in flower`},null,-1)]]),versicolor:p(()=>[...i[1]||=[s(`img`,{src:``+new URL(`iris-versicolor-DED4EHyk.jpg`,import.meta.url).href,alt:`Iris versicolor in flower`},null,-1)]]),virginica:p(()=>[...i[2]||=[s(`img`,{src:``+new URL(`iris-virginica-7D5qYfzB.jpg`,import.meta.url).href,alt:`Iris virginica in flower`},null,-1)]]),_:1})]),_:1},16)}}};export{X as default};
|
lecture-02/assets/md-BtysGq6-.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,O as t,St as n,V as r,_ as i,bt as a,tt as o,v as s,w as c}from"./modules/shiki-ZbpftOCw.js";import{n as l,t as u}from"./slidev/context-Dg_28hwb.js";import{t as d}from"./interactive--xmYYvz-.js";import{t as f}from"./PerceptronPlayground-B3aJX6mT.js";var p={__name:`slides.md__slidev_12`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=f;return r(),s(d,n(t(a(u)(a(b),11))),{aside:o(t=>[...p[0]||=[i(`p`,null,[i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`σ`),i(`mo`,{stretchy:`false`},`(`),i(`msup`,null,[i(`mi`,{mathvariant:`bold`},`w`),i(`mi`,{mathvariant:`normal`},`⊤`)]),i(`mi`,{mathvariant:`bold`},`x`),i(`mo`,null,`+`),i(`mi`,null,`b`),i(`mo`,{stretchy:`false`},`)`)]),i(`annotation`,{encoding:`application/x-tex`},`\\sigma(\\mathbf{w}^\\top\\mathbf{x} + b)`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1.0991em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),i(`span`,{class:`mopen`},`(`),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.8491em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`⊤`)])])])])])])]),i(`span`,{class:`mord mathbf`},`x`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),i(`span`,{class:`mbin`},`+`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),i(`span`,{class:`mord mathnormal`},`b`),i(`span`,{class:`mclose`},`)`)])])]),e(` splits the plane with a `),i(`strong`,null,`linear decision boundary`),e(`: the line where `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`z`),i(`mo`,null,`=`),i(`mn`,null,`0`)]),i(`annotation`,{encoding:`application/x-tex`},`z = 0`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),i(`span`,{class:`mrel`},`=`),i(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),i(`span`,{class:`mord`},`0`)])])]),e(`, with one side firing and the other not.`)],-1),i(`p`,null,[e(`Drag `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`w`),i(`mn`,null,`1`)]),i(`mo`,{separator:`true`},`,`),i(`msub`,null,[i(`mi`,null,`w`),i(`mn`,null,`2`)])]),i(`annotation`,{encoding:`application/x-tex`},`w_1, w_2`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`1`)])])]),i(`span`,{class:`vlist-s`},``)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])]),i(`span`,{class:`mpunct`},`,`),i(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},`2`)])])]),i(`span`,{class:`vlist-s`},``)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])]),e(` to `),i(`strong`,null,`rotate`),e(` it, `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`b`)]),i(`annotation`,{encoding:`application/x-tex`},`b`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),i(`span`,{class:`mord mathnormal`},`b`)])])]),e(` to `),i(`strong`,null,`slide`),e(` it. That is the whole model.`)],-1),i(`div`,{class:`mt-3 dl-secondary`},` Right: the same 24 points collapsed to one number each. The step cuts that axis at zero. `,-1)]]),default:o(()=>[c(m,{mode:`boundary`})]),_:1},16)}}};export{p as default};
|
lecture-02/assets/md-Bv7Je2J8.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./default-C3zMja2v.js";import{t as h}from"./slidev/KaTexBlockWrapper-BOQji8kD.js";var g={class:`grid grid-cols-2 gap-6 mt-2 dl-math-xs`},_={class:`mt-6`},v={class:`mt-4 dl-secondary`},y={class:`mt-6`},b={__name:`slides.md__slidev_28`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=h,S=t(`click`);return i(),u(m,r(n(s(p)(s(D),27))),{default:l(()=>[b[8]||=a(`h1`,null,`The update, written out`,-1),a(`div`,g,[a(`div`,null,[d(x,{ranges:[]},{default:l(()=>[...b[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`:`),a(`mo`,null,`=`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`+`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mspace`,{width:`2em`}),a(`mi`,null,`b`),a(`mo`,null,`:`),a(`mo`,null,`=`),a(`mi`,null,`b`),a(`mo`,null,`+`),a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w} := \\mathbf{w} + \\Delta\\mathbf{w}, \\qquad b := b + \\Delta b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`:=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`2em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`:=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7778em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`)])])])])],-1)]]),_:1}),c((i(),o(`div`,_,[d(x,{ranges:[]},{default:l(()=>[...b[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,{mathvariant:`normal`},`∇`),a(`mi`,{mathvariant:`bold`},`w`)]),a(`mi`,null,`L`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`b`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta\\mathbf{w} = -\\eta\\,\\nabla_{\\mathbf{w}} L(\\mathbf{w}, b)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`∇`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1611em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathbf mtight`,style:{"margin-right":`0.016em`}},`w`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1}),d(x,{ranges:[]},{default:l(()=>[...b[2]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,{mathvariant:`normal`},`∇`),a(`mi`,null,`b`)]),a(`mi`,null,`L`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`b`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = -\\eta\\,\\nabla_{b} L(\\mathbf{w}, b)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`∇`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3361em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`b`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1})])),[[S]]),c((i(),o(`div`,v,[...b[3]||=[e(` The gradient of the loss. But how do we actually calculate it? `,-1)]])),[[S]])]),c((i(),o(`div`,null,[d(x,{ranges:[]},{default:l(()=>[...b[4]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mtext`,null,` `),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\frac{\\partial L}{\\partial w_j} = -\\frac{1}{n} \\sum_i \\bigl(y^{(i)} - \\sigma(z^{(i)})\\bigr)\\, x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])])],-1)]]),_:1}),d(x,{ranges:[]},{default:l(()=>[...b[5]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`b`)])]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\frac{\\partial L}{\\partial b} = -\\frac{1}{n} \\sum_i \\bigl(y^{(i)} - \\sigma(z^{(i)})\\bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0574em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`b`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.288em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)])])])])])],-1)]]),_:1}),a(`div`,y,[d(x,{ranges:[]},{default:l(()=>[...b[6]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta w_j = -\\eta\\,\\frac{\\partial L}{\\partial w_j}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9694em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1}),d(x,{ranges:[]},{default:l(()=>[...b[7]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mi`,null,`η`),a(`mtext`,null,` `),a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`b`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b = -\\eta\\,\\frac{\\partial L}{\\partial b}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0574em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`b`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1})])])),[[S]])])]),_:1},16)}}};export{b as default};
|
lecture-02/assets/md-C4-Bg5un2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";var g={class:`grid grid-cols-[1.45fr_1fr] gap-5 mt-1 items-start`},_={class:`dl-ledger dl-tight dl-eq-legend`},v={viewBox:`0 0 300 150`,style:{width:`100%`,"max-width":`19rem`,height:`auto`},role:`img`,"aria-label":`Worked example: on the centimetre scale the mean is 2.86 and flower 51 sits at 4.7; on the standardised scale the mean is 0 and flower 51 sits at 1.28`},y={class:`dl-callout`},b={__name:`slides.md__slidev_33`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=t(`click`);return i(),u(h,r(n(s(p)(s(D),32))),{default:l(()=>[b[3]||=a(`h1`,null,`Reading the equation: standardisation`,-1),a(`div`,g,[a(`div`,_,[d(x,null,{default:l(()=>[...b[0]||=[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`what it is here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`j`)]),a(`annotation`,{encoding:`application/x-tex`},`j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])])]),a(`td`,null,`feature index`),a(`td`,null,`which column; each feature is scaled on its own`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])]),e(` (petal length)`)])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`)])]),a(`annotation`,{encoding:`application/x-tex`},`x_j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`raw feature`),a(`td`,null,`one measurement, in cm (data)`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`4.7`)]),a(`annotation`,{encoding:`application/x-tex`},`4.7`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.7`)])])]),e(` cm`)])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`μ`),a(`mi`,null,`j`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\mu_j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`μ`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`mean`),a(`td`,null,[e(`average of feature `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`j`)]),a(`annotation`,{encoding:`application/x-tex`},`j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])]),e(` over the training set`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2.86`)]),a(`annotation`,{encoding:`application/x-tex`},`2.86`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2.86`)])])]),e(` cm`)])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`σ`),a(`mi`,null,`j`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma_j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`standard deviation`),a(`td`,null,[e(`typical distance from the mean — `),a(`strong`,null,`not`),e(` the activation `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1.44`)]),a(`annotation`,{encoding:`application/x-tex`},`1.44`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.44`)])])]),e(` cm`)])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`x_j'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.1467em`,"vertical-align":`-0.3948em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-2.4413em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3948em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`standardised feature`),a(`td`,null,`distance from the mean, counted in standard deviations; no units`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1.28`)]),a(`annotation`,{encoding:`application/x-tex`},`1.28`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.28`)])])])])])])],-1)]]),_:1})]),a(`div`,null,[(i(),o(`svg`,v,[...b[1]||=[a(`g`,{style:{stroke:`var(--dl-body)`,"stroke-width":`1.4`}},[a(`line`,{x1:`20`,y1:`45`,x2:`290`,y2:`45`}),a(`line`,{x1:`20`,y1:`115`,x2:`290`,y2:`115`})],-1),a(`g`,{style:{stroke:`var(--dl-border)`,"stroke-width":`1`,"stroke-dasharray":`3 3`}},[a(`line`,{x1:`117`,y1:`45`,x2:`155`,y2:`115`}),a(`line`,{x1:`210`,y1:`45`,x2:`238`,y2:`115`})],-1),a(`g`,{style:{fill:`var(--dl-muted)`}},[a(`circle`,{cx:`117`,cy:`45`,r:`4`}),a(`circle`,{cx:`155`,cy:`115`,r:`4`})],-1),a(`g`,{style:{fill:`var(--dl-accent)`}},[a(`circle`,{cx:`210`,cy:`45`,r:`6`}),a(`circle`,{cx:`238`,cy:`115`,r:`6`})],-1),a(`g`,{style:{fill:`var(--dl-heading)`,"font-size":`13px`},"text-anchor":`middle`},[a(`text`,{x:`117`,y:`32`},`μ = 2.86`),a(`text`,{x:`210`,y:`32`},`4.7`),a(`text`,{x:`155`,y:`102`},`0`),a(`text`,{x:`238`,y:`102`},`1.28`)],-1),a(`g`,{style:{fill:`var(--dl-muted)`,"font-size":`11px`}},[a(`text`,{x:`20`,y:`64`},`raw, cm`),a(`text`,{x:`20`,y:`134`},`standardised`)],-1)]])),c((i(),o(`div`,y,[...b[2]||=[a(`p`,null,[e(`Flower 51, petal length: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msubsup`,null,[a(`mi`,null,`x`),a(`mn`,null,`2`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,null,`=`),a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mfrac`,null,[a(`mrow`,null,[a(`mn`,null,`4.7`),a(`mo`,null,`−`),a(`mn`,null,`2.86`)]),a(`mn`,null,`1.44`)])]),a(`mo`,null,`=`),a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mfrac`,null,[a(`mn`,null,`1.84`),a(`mn`,null,`1.44`)])]),a(`mo`,null,`=`),a(`mn`,null,`1.28`)]),a(`annotation`,{encoding:`application/x-tex`},`x_2' = \\dfrac{4.7 - 2.86}{1.44} = \\dfrac{1.84}{1.44} = 1.28`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.2481em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-2.4519em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])]),a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2481em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0074em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1.44`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`4.7`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},`2.86`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0074em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1.44`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1.84`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.28`)])])])],-1),a(`p`,null,[e(`Flower 1: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mstyle`,{scriptlevel:`0`,displaystyle:`true`},[a(`mfrac`,null,[a(`mrow`,null,[a(`mn`,null,`1.4`),a(`mo`,null,`−`),a(`mn`,null,`2.86`)]),a(`mn`,null,`1.44`)])]),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`1.01`)]),a(`annotation`,{encoding:`application/x-tex`},`\\dfrac{1.4 - 2.86}{1.44} = -1.01`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0074em`,"vertical-align":`-0.686em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1.44`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1.4`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},`2.86`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1.01`)])])])],-1)]])),[[S]])])])]),_:1},16)}}};export{b as default};
|
lecture-02/assets/md-C8lEeNrC.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./default-C3zMja2v.js";import{t as h}from"./slidev/KaTexBlockWrapper-BOQji8kD.js";var g={class:`dl-derivation dl-math-sm`},_={class:`mt-2 dl-secondary`},v={__name:`slides.md__slidev_30`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=h,b=t(`click`);return i(),u(m,r(n(s(p)(s(T),29))),{default:l(()=>[v[5]||=a(`h1`,null,`How do we calculate the MSE derivative?`,-1),v[6]||=a(`div`,{class:`dl-secondary`},[a(`p`,null,[e(`As before: loss `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`L`)]),a(`annotation`,{encoding:`application/x-tex`},`L`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord mathnormal`},`L`)])])]),e(` over `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`n`)]),a(`annotation`,{encoding:`application/x-tex`},`n`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`n`)])])]),e(` flowers, label `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`y^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])]),e(`, feature `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.4578em`,"vertical-align":`-0.413em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])]),e(`, weight `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])]),a(`annotation`,{encoding:`application/x-tex`},`w_j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])]),e(`, bias `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])]),e(`, output `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z^{(i)}) = z^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.138em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])]),e(`.`)])],-1),a(`div`,g,[a(`div`,null,[d(y,{ranges:[]},{default:l(()=>[...v[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mfrac`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mi`,null,`L`)]),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,null,`=`),a(`mfrac`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`2`),a(`mi`,null,`n`)])]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`msup`,null,[a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mn`,null,`2`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\frac{\\partial L}{\\partial w_j} = \\frac{\\partial}{\\partial w_j} \\frac{1}{2n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr)^2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord mathnormal`},`L`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.6491em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`2`),a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.004em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.354em`}},[a(`span`,{style:{top:`-3.6029em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])])])])])])])])])])],-1)]]),_:1})]),c((i(),o(`div`,null,[d(y,{ranges:[]},{default:l(()=>[...v[1]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mfrac`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`= \\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr) \\frac{\\partial}{\\partial w_j}\\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)])])])])])],-1)]]),_:1})])),[[b]]),c((i(),o(`div`,null,[d(y,{ranges:[]},{default:l(()=>[...v[2]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mfrac`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`∂`),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`msub`,null,[a(`mo`,null,`∑`),a(`mi`,null,`k`)]),a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`k`)]),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`k`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`+`),a(`mi`,null,`b`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`)])]),a(`annotation`,{encoding:`application/x-tex`},`= \\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr) \\frac{\\partial}{\\partial w_j}\\Bigl(y^{(i)} - \\bigl(\\textstyle\\sum_k w_k x_k^{(i)} + b\\bigr)\\Bigr)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3435em`,"vertical-align":`-0.9721em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3714em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`,style:{"margin-right":`0.0556em`}},`∂`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.9721em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.3948em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mop`},[a(`span`,{class:`mop op-symbol small-op`,style:{position:`relative`,top:`0em`}},`∑`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1864em`}},[a(`span`,{style:{top:`-2.4003em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2997em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3361em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.3987em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3013em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`},`b`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)])])])])])],-1)]]),_:1})])),[[b]]),c((i(),o(`div`,null,[d(y,{ranges:[]},{default:l(()=>[...v[3]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`mo`,null,`−`),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mi`,null,`n`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`i`)]),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),a(`msup`,null,[a(`mi`,null,`y`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`−`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`z`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`true`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),a(`msubsup`,null,[a(`mi`,null,`x`),a(`mi`,null,`j`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`i`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`= \\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr)\\bigl(-x_j^{(i)}\\bigr) = -\\frac{1}{n} \\sum_i \\Bigl(y^{(i)} - \\sigma(z^{(i)})\\Bigr) x_j^{(i)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])]),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size1`},`)`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.5991em`,"vertical-align":`-1.2777em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`n`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.686em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.2777em`}},[a(`span`)])])])]),a(`span`,{class:`mopen`},[a(`span`,{class:`delimsizing size2`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.8em`,"vertical-align":`-0.65em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.938em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mclose`},[a(`span`,{class:`delimsizing size2`},`)`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.0448em`}},[a(`span`,{style:{top:`-2.4231em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])]),a(`span`,{style:{top:`-3.2198em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`i`),a(`span`,{class:`mclose mtight`},`)`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.413em`}},[a(`span`)])])])])])])])])])],-1)]]),_:1})])),[[b]])]),c((i(),o(`div`,_,[...v[4]||=[a(`p`,null,[e(`Index `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`k`)]),a(`annotation`,{encoding:`application/x-tex`},`k`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0315em`}},`k`)])])]),e(` runs over features; only `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`k`),a(`mo`,null,`=`),a(`mi`,null,`j`)]),a(`annotation`,{encoding:`application/x-tex`},`k = j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0315em`}},`k`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.854em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0572em`}},`j`)])])]),e(` holds `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`w`),a(`mi`,null,`j`)])]),a(`annotation`,{encoding:`application/x-tex`},`w_j`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7167em`,"vertical-align":`-0.2861em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0269em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0269em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0572em`}},`j`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2861em`}},[a(`span`)])])])])])])])]),e(`. Two flowers: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`mstyle`,{scriptlevel:`0`,displaystyle:`false`},[a(`mfrac`,null,[a(`mn`,null,`1`),a(`mn`,null,`2`)])]),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`0`),a(`mo`,null,`×`),a(`mn`,null,`5.1`),a(`mo`,null,`+`),a(`mn`,null,`1`),a(`mo`,null,`×`),a(`mn`,null,`7.0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`3.5`)]),a(`annotation`,{encoding:`application/x-tex`},`-\\tfrac12(0 \\times 5.1 + 1 \\times 7.0) = -3.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.1901em`,"vertical-align":`-0.345em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8451em`}},[a(`span`,{style:{top:`-2.655em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`2`)])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.394em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.345em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`5.1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`7.0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`3.5`)])])]),e(`.`)],-1)]])),[[b]])]),_:1},16)}}};export{v as default};
|
lecture-02/assets/md-C9QTaqTf.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./default-C3zMja2v.js";var g={class:`grid grid-cols-[1.45fr_1fr] gap-5 mt-1 items-start`},_={class:`dl-ledger dl-tight dl-eq-legend`},v={viewBox:`0 0 300 150`,style:{width:`100%`,"max-width":`19rem`,height:`auto`},role:`img`,"aria-label":`Worked example: inputs 1 and 2 give hidden values 1 and minus 1 and output 3.5; the single merged layer with weights 3 and minus 1 and bias 2.5 also gives 3.5`},y={class:`dl-callout`},b={__name:`slides.md__slidev_43`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=t(`click`);return i(),u(h,r(n(s(p)(s(D),42))),{default:l(()=>[b[3]||=a(`h1`,null,`Reading the equation: two linear layers`,-1),a(`div`,g,[a(`div`,_,[d(x,null,{default:l(()=>[...b[0]||=[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`what it is here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`x`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`},`x`)])])])]),a(`td`,null,`input vector`),a(`td`,null,`data`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`2`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[1,\\ 2]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mclose`},`]`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mrow`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`h`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mtext`,null,`\xA0`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`out`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`^{(h)},\\ ^{(\\text{out})}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`h`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord text mtight`},[a(`span`,{class:`mord mtight`},`out`)]),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`layer labels`),a(`td`,null,`hidden layer, output layer — not powers`),a(`td`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`W`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`h`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`b`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`h`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`W^{(h)},\\ \\mathbf{b}^{(h)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`h`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`b`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`h`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`hidden weights, bias`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2`),a(`mo`,null,`×`),a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`2 \\times 2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])]),e(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])]),e(` numbers, learned`)]),a(`td`,null,[e(`rows `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[1,\\ 0]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`]`)])])]),e(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[-1,\\ 1]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`]`)])])]),e(`; `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mo`,null,`−`),a(`mn`,null,`2`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[0,\\ -2]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mclose`},`]`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`a`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`h`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{a}^{(h)}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`h`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`hidden activations`),a(`td`,null,`hidden layer’s output`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[1,\\ -1]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`]`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`W`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`out`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`b`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`out`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`W^{(\\text{out})},\\ \\mathbf{b}^{(\\text{out})}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0824em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord text mtight`},[a(`span`,{class:`mord mtight`},`out`)]),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`b`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord text mtight`},[a(`span`,{class:`mord mtight`},`out`)]),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`output weights, bias`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`),a(`mo`,null,`×`),a(`mn`,null,`2`)]),a(`annotation`,{encoding:`application/x-tex`},`1 \\times 2`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2`)])])]),e(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),e(` number, learned`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[2,\\ -1]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`]`)])])]),e(`; `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0.5`)]),a(`annotation`,{encoding:`application/x-tex`},`0.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.5`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`a`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`out`),a(`mo`,{stretchy:`false`},`)`)])])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{a}^{(\\text{out})}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord text mtight`},[a(`span`,{class:`mord mtight`},`out`)]),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])])])])])]),a(`td`,null,`network output`),a(`td`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`3.5`)]),a(`annotation`,{encoding:`application/x-tex`},`3.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.5`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`W`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`b`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`W',\\ \\mathbf{b}'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9463em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`W`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`b`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`td`,null,`merged weights, bias`),a(`td`,null,`one layer, same job`),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`3`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`[3,\\ -1]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`]`)])])]),e(`; `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2.5`)]),a(`annotation`,{encoding:`application/x-tex`},`2.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2.5`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mi`,null,`z`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z) = z`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`)])])])]),a(`td`,null,`identity activation`),a(`td`,null,`changes nothing`),a(`td`)])])],-1)]]),_:1})]),a(`div`,null,[(i(),o(`svg`,v,[...b[1]||=[a(`g`,{style:{fill:`none`,stroke:`var(--dl-border)`,"stroke-width":`1.4`}},[a(`line`,{x1:`48`,y1:`30`,x2:`132`,y2:`30`}),a(`line`,{x1:`48`,y1:`30`,x2:`132`,y2:`90`}),a(`line`,{x1:`48`,y1:`90`,x2:`132`,y2:`30`}),a(`line`,{x1:`48`,y1:`90`,x2:`132`,y2:`90`}),a(`line`,{x1:`168`,y1:`30`,x2:`242`,y2:`60`}),a(`line`,{x1:`168`,y1:`90`,x2:`242`,y2:`60`})],-1),a(`g`,{style:{fill:`var(--dl-surface)`,stroke:`var(--dl-border)`,"stroke-width":`1.5`}},[a(`circle`,{cx:`30`,cy:`30`,r:`18`}),a(`circle`,{cx:`30`,cy:`90`,r:`18`}),a(`circle`,{cx:`150`,cy:`30`,r:`18`}),a(`circle`,{cx:`150`,cy:`90`,r:`18`})],-1),a(`circle`,{cx:`260`,cy:`60`,r:`20`,style:{fill:`var(--dl-accent-soft)`,stroke:`var(--dl-accent)`,"stroke-width":`1.5`}},null,-1),a(`g`,{style:{fill:`var(--dl-heading)`,"font-size":`13px`},"text-anchor":`middle`},[a(`text`,{x:`30`,y:`35`},`1`),a(`text`,{x:`30`,y:`95`},`2`),a(`text`,{x:`150`,y:`35`},`1`),a(`text`,{x:`150`,y:`95`},`−1`),a(`text`,{x:`260`,y:`65`},`3.5`)],-1),a(`g`,{style:{fill:`var(--dl-muted)`,"font-size":`11px`},"text-anchor":`middle`},[a(`text`,{x:`30`,y:`124`},`x`),a(`text`,{x:`150`,y:`124`},`a⁽ʰ⁾`),a(`text`,{x:`260`,y:`96`},`a⁽ᵒᵘᵗ⁾`),a(`text`,{x:`150`,y:`145`},`merged: W′x + b′ = 3.5`)],-1)]])),c((i(),o(`div`,y,[...b[2]||=[a(`p`,null,[e(`Two layers: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`a`),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`h`),a(`mo`,{stretchy:`false`},`)`)])]),a(`mo`,null,`=`),a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,null,`+`),a(`mn`,null,`2`),a(`mo`,null,`−`),a(`mn`,null,`2`),a(`mo`,{stretchy:`false`},`]`),a(`mo`,null,`=`),a(`mo`,{stretchy:`false`},`[`),a(`mn`,null,`1`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{a}^{(h)} = [1,\\ -1 + 2 - 2] = [1,\\ -1]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.888em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.888em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mopen mtight`},`(`),a(`span`,{class:`mord mathnormal mtight`},`h`),a(`span`,{class:`mclose mtight`},`)`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mclose`},`]`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`]`)])])])],-1),a(`p`,null,[e(`then `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`2`),a(`mo`,null,`×`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,null,`×`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`+`),a(`mn`,null,`0.5`),a(`mo`,null,`=`),a(`mn`,null,`3.5`)]),a(`annotation`,{encoding:`application/x-tex`},`2 \\times 1 - 1 \\times (-1) + 0.5 = 3.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.5`)])])])],-1),a(`p`,null,[e(`One layer: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`3`),a(`mo`,null,`×`),a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,null,`×`),a(`mn`,null,`2`),a(`mo`,null,`+`),a(`mn`,null,`2.5`),a(`mo`,null,`=`),a(`mn`,null,`3.5`)]),a(`annotation`,{encoding:`application/x-tex`},`3 \\times 1 - 1 \\times 2 + 2.5 = 3.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.5`)])])]),e(` — the same.`)],-1)]])),[[S]])])])]),_:1},16)}}};export{b as default};
|
lecture-02/assets/md-CBkiQdVT.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./default-C3zMja2v.js";import{t as h}from"./Citation-C2mQSZCj.js";var g={class:`mt-2 text-right`},_={class:`mt-2 dl-callout`},v={__name:`slides.md__slidev_24`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=h,b=t(`click`);return i(),u(m,r(n(s(p)(s(T),23))),{default:l(()=>[v[1]||=a(`h1`,null,`What follows from moving that one edge`,-1),v[2]||=a(`div`,{class:`dl-compare-table mt-3`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`),a(`th`,null,[a(`strong`,null,`Perceptron`),e(` — Rosenblatt, 1957`)]),a(`th`,null,[a(`strong`,null,`Adaline`),e(` — Widrow & Hoff, 1960`)])])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,`Learning activation`),a(`td`,null,[e(`unit step, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`∈`),a(`mo`,{stretchy:`false`},`{`),a(`mn`,null,`0`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`1`),a(`mo`,{stretchy:`false`},`}`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z) \\in \\{0, 1\\}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∈`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`{`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mclose`},`}`)])])])]),a(`td`,null,[e(`linear, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mi`,null,`z`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z) = z`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`)])])])])]),a(`tr`,null,[a(`td`,null,`Error measured from`),a(`td`,null,[e(`the `),a(`strong`,null,`thresholded`),e(` label `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])])])])])]),a(`td`,null,[e(`the `),a(`strong`,null,`continuous`),e(),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\sigma(z)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`)])])]),e(`, before thresholding`)])]),a(`tr`,null,[a(`td`,null,`Loss function`),a(`td`,null,`none — it minimises nothing`),a(`td`,null,[e(`mean squared error: differentiable `),a(`strong`,null,`and`),e(` convex`)])]),a(`tr`,null,[a(`td`,null,`How the weights move`),a(`td`,null,`a hand-written correction, one example at a time, only on a mistake`),a(`td`,null,[a(`strong`,null,`gradient descent`),e(`, over all `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`n`)]),a(`annotation`,{encoding:`application/x-tex`},`n`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`n`)])])]),e(` examples, every step`)])]),a(`tr`,null,[a(`td`,null,`Converges`),a(`td`,null,`only if the classes are linearly separable`),a(`td`,null,`always — to the single MSE minimum, separable or not`)])])])],-1),a(`div`,g,[d(y,{source:`Raschka — “Perceptron, Adaline, and neural network models”`,url:`https://sebastianraschka.com/faq/docs/diff-perceptron-adaline-neuralnet.html`})]),c((i(),o(`div`,_,[...v[0]||=[e(` The unit step's derivative is zero everywhere it exists. That is why the perceptron has no loss to descend. `,-1)]])),[[b]])]),_:1},16)}}};export{v as default};
|
lecture-02/assets/md-CGp3oyRC.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,K as t,O as n,St as r,V as i,_ as a,b as o,bt as s,nt as c,tt as l,v as u,w as d}from"./modules/shiki-ZbpftOCw.js";import{n as f,t as p}from"./slidev/context-Dg_28hwb.js";import{t as m}from"./slidev/VClicks-l0jZV8Zg.js";import{t as h}from"./interactive--xmYYvz-.js";import{t as g}from"./PerceptronDiagram-CmZJT5ND.js";var _={class:`dl-tight`},v={class:`mt-4 dl-prompt`},y={__name:`slides.md__slidev_20`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=f();return S.setup(),(f,y)=>{let b=g,x=m,S=t(`click`);return i(),u(h,r(n(s(p)(s(E),19))),{aside:l(t=>[a(`div`,_,[d(x,null,{default:l(()=>[...y[0]||=[a(`ul`,null,[a(`li`,null,[e(`Inputs `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`x`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{x}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`},`x`)])])]),e(`, scaled by weights `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])])]),a(`li`,null,[e(`Summed into the net input `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`z`),a(`mo`,null,`=`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mi`,{mathvariant:`normal`},`⊤`)]),a(`mi`,{mathvariant:`bold`},`x`),a(`mo`,null,`+`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`z = \\mathbf{w}^\\top\\mathbf{x} + b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9324em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8491em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`⊤`)])])])])])])]),a(`span`,{class:`mord mathbf`},`x`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])])]),a(`li`,null,[e(`Thresholded into a class label `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mover`,{accent:`true`},[a(`mi`,null,`y`),a(`mo`,null,`^`)]),a(`mo`,null,`=`),a(`mi`,null,`σ`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`z`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\hat{y} = \\sigma(z)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord katex-accent`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6944em`}},[a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`accent-body`,style:{left:`-0.1944em`}},[a(`span`,{class:`mord`},`^`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1944em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`σ`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.044em`}},`z`),a(`span`,{class:`mclose`},`)`)])])])]),a(`li`,null,[e(`Compared against the true label `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`y`)]),a(`annotation`,{encoding:`application/x-tex`},`y`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`y`)])])])]),a(`li`,null,[e(`The error drives `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),e(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`normal`},`Δ`),a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`\\Delta b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord`},`Δ`),a(`span`,{class:`mord mathnormal`},`b`)])])])])],-1)]]),_:1}),c((i(),o(`div`,v,[...y[1]||=[e(` Can you read the whole diagram now? `,-1)]])),[[S]])])]),default:l(()=>[d(b,{static:``})]),_:1},16)}}};export{y as default};
|
lecture-02/assets/md-CK-2SOMM.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,O as t,St as n,V as r,_ as i,bt as a,tt as o,v as s,w as c}from"./modules/shiki-ZbpftOCw.js";import{n as l,t as u}from"./slidev/context-Dg_28hwb.js";import{t as d}from"./slidev/VClicks-l0jZV8Zg.js";import{t as f}from"./default-C3zMja2v.js";var p={__name:`slides.md__slidev_22`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=d;return r(),s(f,n(t(a(u)(a(b),21))),{default:o(()=>[p[1]||=i(`h1`,null,[e(`ADALINE `),i(`span`,{class:`dl-secondary`},`(the Widrow–Hoff rule)`)],-1),c(m,null,{default:o(()=>[...p[0]||=[i(`ul`,null,[i(`li`,null,[e(`Published by `),i(`strong`,null,`Bernard Widrow`),e(` and his doctoral student `),i(`strong`,null,`Tedd Hoff`),e(`, only a few years after Rosenblatt’s perceptron.`)]),i(`li`,null,[e(`It is the natural next step: it illustrates how to define and `),i(`strong`,null,`minimise a continuous loss function`),e(`.`)]),i(`li`,null,[e(`The key change: weights are updated from a `),i(`strong`,null,`linear`),e(` activation, rather than from a unit step.`)])],-1)]]),_:1})]),_:1},16)}}};export{p as default};
|
lecture-02/assets/md-CZnahp6h2.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,O as n,St as r,V as i,_ as a,b as o,bt as s,ft as c,g as l,tt as u,v as d,w as f,wt as p,y as m}from"./modules/shiki-ZbpftOCw.js";import{t as h}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as g,t as _}from"./slidev/context-Dg_28hwb.js";import{t as v}from"./slidev/KaTexBlockWrapper-BOQji8kD.js";import{n as y,t as b}from"./interactive--xmYYvz-.js";import{t as x}from"./StepButton-DiDduF86.js";import{n as S,t as C}from"./PlotPoints-BmurSwXE.js";import{t as w}from"./PlotCurve-D4pyGHKn.js";import{t as T}from"./useRandom-CKuF3nnJ.js";var E={class:`dl-sgd__setup`},D={class:`dl-sgd__legend`},O={key:0,class:`dl-sgd__note`},k=h(t({__name:`SGDvsBatch`,props:{optimum:{default:2},eta:{default:.22},start:{default:5.6},n:{default:500},noise:{default:1.1}},setup(t){let{$slidev:n,$nav:r,$clicksContext:s,$clicks:h,$page:_,$renderContext:v,$frontmatter:b}=g(),k=t,A=[-2.4,6.4],j=[0,9],M=e=>.5*(e-k.optimum)**2+.4,N=e=>e-k.optimum,P=c(0),F=l(()=>{let e=T(90210),t=[k.start],n=[k.start];for(let r=0;r<P.value;r++)t.push(t[r]-k.eta*N(t[r])),n.push(n[r]-k.eta*(N(n[r])+e()*k.noise));return{batch:t,sgd:n}}),I=e=>e.filter(e=>e>=A[0]&&e<=A[1]).map(e=>({x:e,y:M(e)})),L=l(()=>P.value*k.n),R=l(()=>P.value);return(t,n)=>{let r=w,s=C,c=S,l=x,h=y;return i(),d(h,{"max-width":`44rem`},{controls:u(()=>[f(l,{label:`Step`,glyph:`▶`,onClick:n[0]||=e=>P.value++}),f(l,{label:`Run 20`,variant:`ghost`,onClick:n[1]||=e=>P.value+=20}),f(l,{label:`Reset`,variant:`ghost`,onClick:n[2]||=e=>P.value=0})]),readout:u(()=>[a(`div`,E,[n[3]||=e(` Dataset: `,-1),a(`strong`,null,`n = `+p(k.n.toLocaleString()),1),n[4]||=e(` training examples; one `,-1),n[5]||=a(`em`,null,`step`,-1),n[6]||=e(` = one update of `,-1),n[7]||=a(`i`,null,`w`,-1),n[8]||=e(`. `,-1)]),a(`div`,D,[a(`span`,null,[n[9]||=a(`i`,{class:`dot is-batch`},null,-1),e(` full batch — reads all `+p(k.n.toLocaleString())+` examples per step `,1)]),n[10]||=a(`span`,null,[a(`i`,{class:`dot is-sgd`}),e(` stochastic — reads 1 example per step`)],-1)]),a(`div`,null,[e(p(P.value)+` step`+p(P.value===1?``:`s`)+` · gradient evaluations so far: `,1),a(`strong`,null,p(L.value.toLocaleString()),1),n[11]||=e(` vs `,-1),a(`strong`,null,p(R.value.toLocaleString()),1),P.value>0?(i(),o(`span`,O,` — same `+p(P.value)+` update`+p(P.value===1?``:`s`)+`, `+p(k.n.toLocaleString())+`× the work. `,1)):m(`v-if`,!0)])]),default:u(()=>[f(c,{"x-domain":A,"y-domain":j,width:500,height:290,"x-label":`w`,"y-label":`L(w)`},{default:u(()=>[f(r,{fn:M,color:`var(--dl-border)`,width:3}),f(s,{points:I(F.value.batch),radius:4,color:`var(--dl-accent)`,opacity:.85},null,8,[`points`]),f(s,{points:I(F.value.sgd),radius:4,color:`var(--dl-danger)`,opacity:.85},null,8,[`points`])]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-b0fed719`]]),A={class:`dl-math-xs`},j={__name:`slides.md__slidev_34`,setup(t){let{$slidev:o,$nav:c,$clicksContext:l,$clicks:p,$page:m,$renderContext:h,$frontmatter:y}=g();return l.setup(),(t,o)=>{let c=k,l=v;return i(),d(b,r(n(s(_)(s(y),33))),{aside:u(t=>[o[1]||=a(`p`,null,[e(`One `),a(`strong`,null,`step`),e(` is one update of `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),e(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`b`)]),a(`annotation`,{encoding:`application/x-tex`},`b`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`},`b`)])])]),e(`.`)],-1),o[2]||=a(`p`,null,[e(`Full-batch descent averages the gradient over the `),a(`strong`,null,`whole`),e(` training set. All `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`n`)]),a(`annotation`,{encoding:`application/x-tex`},`n`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`n`)])])]),e(` examples are visited before the weights move once (here `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`n`),a(`mo`,null,`=`),a(`mn`,null,`500`)]),a(`annotation`,{encoding:`application/x-tex`},`n = 500`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`n`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`500`)])])]),e(`).`)],-1),o[3]||=a(`p`,null,[a(`strong`,null,`Stochastic gradient descent (SGD)`),e(` estimates that average from one example or a mini-batch, then steps at once. Noisier, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`n`)]),a(`annotation`,{encoding:`application/x-tex`},`n`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`n`)])])]),e(` times cheaper per step, and it supports `),a(`strong`,null,`online learning`),e(`.`)],-1),o[4]||=a(`p`,null,`With SGD we often let the learning rate shrink over time, e.g.`,-1),a(`div`,A,[f(l,{ranges:[]},{default:u(()=>[...o[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`η`),a(`mo`,null,`=`),a(`mfrac`,null,[a(`msub`,null,[a(`mi`,null,`c`),a(`mn`,null,`1`)]),a(`mrow`,null,[a(`mo`,{stretchy:`false`},`[`),a(`mtext`,null,`number\xA0of\xA0iterations`),a(`mo`,{stretchy:`false`},`]`),a(`mo`,null,`+`),a(`msub`,null,[a(`mi`,null,`c`),a(`mn`,null,`2`)])])])]),a(`annotation`,{encoding:`application/x-tex`},`\\eta = \\frac{c_1}{[\\text{number of iterations}] + c_2}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`η`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.0436em`,"vertical-align":`-0.936em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.1076em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`number\xA0of\xA0iterations`)]),a(`span`,{class:`mclose`},`]`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`c`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`c`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`1`)])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),a(`span`,{class:`vlist-s`},``)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.936em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})])])])])])],-1)]]),_:1})])]),default:u(()=>[f(c)]),_:1},16)}}};export{j as default};
|
lecture-02/assets/md-Cl3pAsU7.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import{C as e,E as t,O as n,St as r,U as i,V as a,_ as o,b as s,bt as c,ft as l,g as u,m as d,tt as f,v as p,w as m,wt as h,xt as g,y as _}from"./modules/shiki-ZbpftOCw.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y,t as b}from"./slidev/context-Dg_28hwb.js";import{n as x,t as S}from"./interactive--xmYYvz-.js";import{n as C}from"./useRandom-CKuF3nnJ.js";import{t as w}from"./Citation-C2mQSZCj.js";var T={viewBox:`0 0 680 356`,class:`dl-neuron`,role:`img`,"aria-label":`A biological neuron above the artificial neuron it inspired`},E={class:`bio`},D=[`transform`],O=[`d`,`stroke-width`],k=[`transform`],A=[`cx`,`cy`],j=[`cx`,`cy`],M=[`cx`,`cy`],N=[`x`],P=[`x`],F=[`x1`,`x2`],I={class:`art`},L={class:`dl-neuron__tabs`},R=[`onClick`],z={class:`dl-neuron__map`},B={class:`dl-neuron__breaks`},V=v(t({__name:`NeuronAnatomy`,setup(t){let{$slidev:n,$nav:r,$clicksContext:c,$clicks:m,$page:v,$renderContext:b,$frontmatter:S}=y(),w=[{key:`dend`,bio:`Dendrites`,art:`Inputs x₁ … xₘ`,note:`A branched arbor collecting signals from thousands of upstream cells. Each arriving signal is one feature value.`,breaks:`Dendrites already compute: they filter and non-linearly amplify inputs before the soma ever sees them. An input xⱼ does none of that.`},{key:`syn`,bio:`Synapses`,art:`Weights w₁ … wₘ`,note:`The junction where one cell contacts the next. Its strength decides how much of a signal gets through, and whether the effect is excitatory or inhibitory — magnitude and sign, which is exactly what wⱼ carries. Training changes the weights; learning changes the synapses.`,breaks:`A synapse is chemical, probabilistic and slow to change. A weight is one number, rewritten exactly once per update step.`},{key:`soma`,bio:`Soma (cell body)`,art:`Net input z = wᵀx + b`,note:`The cell body pools the graded potentials arriving from every dendrite. The artificial neuron sums the weighted inputs.`,breaks:`Somatic summation leaks over time — inputs that do not arrive together do not add up. z has no clock and no memory.`},{key:`hill`,bio:`Axon hillock`,art:`Bias b (the threshold, moved)`,note:`Spikes are initiated here, and only once the membrane potential crosses a threshold. That threshold is what the next slide folds into the left-hand side and renames the bias: fire when z = wᵀx + b ≥ 0.`,breaks:`The biological threshold drifts with the cell’s recent history; b is fixed between updates.`},{key:`axon`,bio:`Axon`,art:`Activation σ(z)`,note:`Once triggered, the action potential is all-or-none — the spike is the same size however far the threshold was exceeded, and the myelin between the nodes of Ranvier only makes it travel faster. That is what the unit step models.`,breaks:`The cell reports intensity as a firing *rate* over time, not as a single value — which is nearer a continuous activation than a step. Adaline, two sections from now, is the better analogy.`},{key:`term`,bio:`Axon terminals`,art:`Output ŷ, fanned out`,note:`One axon branches to contact many downstream cells; one unit’s output is fed to every unit in the next layer.`,breaks:`Transmission is chemical and delayed by milliseconds. An edge in a network is an instantaneous multiplication.`}],V=l(`dend`),H=u(()=>w.find(e=>e.key===V.value)),U=e=>V.value===e,W={x:176,y:100},G=[1.95,4.35],K={left:34,top:34,bottom:172},q=u(()=>{let e=C(11),t=[],n=1,r=(i,a,o,s,c,l)=>{let u=i+Math.cos(o)*s,d=a+Math.sin(o)*s;n=-n;let f=(i+u)/2+Math.cos(o+Math.PI/2)*s*.14*n,p=(a+d)/2+Math.sin(o+Math.PI/2)*s*.14*n;if(t.push({d:`M${i.toFixed(1)},${a.toFixed(1)} Q${f.toFixed(1)},${p.toFixed(1)} ${u.toFixed(1)},${d.toFixed(1)}`,w:c,tip:l===0?[u,d]:null}),l===0)return;let m=.3+e()*.2,h=e=>Math.min(Math.max(e,G[0]),G[1]);r(u,d,h(o-m),s*.62,c*.58,l-1),r(u,d,h(o+m),s*.58,c*.58,l-1)};for(let e of[2.05,2.5,2.95,3.4,3.85,4.3])r(W.x+Math.cos(e)*30,W.y+Math.sin(e)*24,e,34,4.6,2);return t}),J=u(()=>q.value.filter(e=>e.tip).map(e=>e.tip)),Y=u(()=>{let e=J.value.map(([e,t])=>Math.min((W.x-K.left-6)/Math.max(W.x-e,1e-6),(W.y-K.top-6)/Math.max(W.y-t,1e-6),(K.bottom-6-W.y)/Math.max(t-W.y,1e-6)));return Math.min(1,...e.filter(e=>e>0))}),X=u(()=>`translate(${W.x} ${W.y}) scale(${Y.value.toFixed(3)}) translate(${-W.x} ${-W.y})`),Z=u(()=>J.value.filter((e,t)=>t%3==0)),Q=[238,302,366,430],$=[294,358,422];return(t,n)=>{let r=x;return a(),p(r,{"max-width":`52rem`},{controls:f(()=>[o(`div`,L,[(a(),s(d,null,i(w,e=>o(`button`,{key:e.key,type:`button`,class:g({"is-active":e.key===V.value}),onClick:t=>V.value=e.key},h(e.bio),11,R)),64))])]),readout:f(()=>[o(`p`,z,[o(`strong`,null,h(H.value.bio),1),n[36]||=e(` ↔ `,-1),o(`strong`,null,h(H.value.art),1),e(` — `+h(H.value.note),1)]),o(`p`,B,[n[37]||=o(`span`,{class:`dl-neuron__flag`},`where the analogy breaks`,-1),e(` `+h(H.value.breaks),1)])]),default:f(()=>[(a(),s(`svg`,T,[_(` ───────────────────────── biological ───────────────────────── `),n[33]||=o(`text`,{x:`16`,y:`16`,class:`head`,"text-anchor":`start`},`Biological neuron`,-1),o(`g`,E,[o(`g`,{class:g({"is-on":U(`dend`)}),onClick:n[0]||=e=>V.value=`dend`},[_(` Labels stay outside the fitting transform so they keep their size. `),o(`g`,{transform:X.value},[(a(!0),s(d,null,i(q.value,(e,t)=>(a(),s(`path`,{key:t,d:e.d,"stroke-width":e.w,class:`process`},null,8,O))),128))],8,D),n[12]||=o(`text`,{x:`40`,y:`188`,class:`lbl`},`dendrites`,-1)],2),o(`g`,{class:g({"is-on":U(`syn`)}),onClick:n[1]||=e=>V.value=`syn`},[o(`g`,{transform:X.value},[(a(!0),s(d,null,i(Z.value,(e,t)=>(a(),s(`circle`,{key:t,cx:e[0],cy:e[1],r:`4.5`,class:`bouton`},null,8,A))),128))],8,k),n[13]||=o(`text`,{x:`126`,y:`188`,class:`lbl`},`synapses`,-1),n[14]||=o(`line`,{x1:`138`,y1:`180`,x2:`128`,y2:`164`,class:`leader`},null,-1)],2),o(`g`,{class:g({"is-on":U(`soma`)}),onClick:n[2]||=e=>V.value=`soma`},[_(` A lumpy closed curve: a cell body is not an ellipse. `),n[15]||=o(`path`,{d:`M146,90 C147,73 161,64 177,69 C193,63 208,72 210,88 C217,99 212,115 199,122
|
| 2 |
+
C186,131 165,129 154,120 C144,113 141,99 146,90 Z`,class:`soma`},null,-1),o(`circle`,{cx:W.x,cy:W.y,r:`11`,class:`nucleus`},null,8,j),o(`circle`,{cx:W.x+3,cy:W.y-2,r:`4`,class:`nucleolus`},null,8,M),n[16]||=o(`text`,{x:`176`,y:`150`,class:`lbl`,"text-anchor":`middle`},`soma`,-1)],2),o(`g`,{class:g({"is-on":U(`hill`)}),onClick:n[3]||=e=>V.value=`hill`},[...n[17]||=[o(`path`,{d:`M204,82 C218,84 226,90 232,96 L232,106 C226,112 218,118 204,120 Z`,class:`hillock`},null,-1),o(`text`,{x:`238`,y:`62`,class:`lbl`},`axon hillock`,-1),o(`line`,{x1:`240`,y1:`66`,x2:`228`,y2:`86`,class:`leader`},null,-1)]],2),o(`g`,{class:g({"is-on":U(`axon`)}),onClick:n[4]||=e=>V.value=`axon`},[n[18]||=o(`line`,{x1:`230`,y1:`101`,x2:`500`,y2:`101`,class:`axon`},null,-1),(a(),s(d,null,i(Q,e=>o(`rect`,{key:e,x:e,y:`87`,width:`56`,height:`28`,rx:`13`,class:`myelin`},null,8,N)),64)),n[19]||=o(`text`,{x:`360`,y:`76`,class:`lbl`,"text-anchor":`middle`},`myelinated axon`,-1),(a(),s(d,null,i($,e=>o(`text`,{key:`n${e}`,x:e,y:`136`,class:`lbl is-tiny`,"text-anchor":`middle`},`node`,8,P)),64)),(a(),s(d,null,i($,e=>o(`line`,{key:`l${e}`,x1:e,y1:`127`,x2:e,y2:`110`,class:`leader`},null,8,F)),64))],2),o(`g`,{class:g({"is-on":U(`term`)}),onClick:n[5]||=e=>V.value=`term`},[...n[20]||=[o(`path`,{d:`M500,101 C518,94 532,80 542,66`,class:`process`,"stroke-width":`3`},null,-1),o(`path`,{d:`M500,101 C522,101 540,101 556,101`,class:`process`,"stroke-width":`3`},null,-1),o(`path`,{d:`M500,101 C518,108 532,122 542,136`,class:`process`,"stroke-width":`3`},null,-1),o(`circle`,{cx:`545`,cy:`63`,r:`6`,class:`bouton`},null,-1),o(`circle`,{cx:`559`,cy:`101`,r:`6`,class:`bouton`},null,-1),o(`circle`,{cx:`545`,cy:`139`,r:`6`,class:`bouton`},null,-1),o(`text`,{x:`540`,y:`168`,class:`lbl`,"text-anchor":`middle`},`axon terminals`,-1)]],2),_(` The cell this one talks to, kept faint: it is context, not a part. `),n[21]||=o(`path`,{d:`M600,44 C588,76 588,126 600,158`,class:`ghost`},null,-1),n[22]||=o(`text`,{x:`628`,y:`105`,class:`lbl is-ghost`,"text-anchor":`middle`},`next`,-1),n[23]||=o(`text`,{x:`628`,y:`119`,class:`lbl is-ghost`,"text-anchor":`middle`},`neuron`,-1)]),n[34]||=o(`line`,{x1:`16`,y1:`196`,x2:`664`,y2:`196`,class:`divider`},null,-1),_(` ───────────────────────── artificial ───────────────────────── `),n[35]||=o(`text`,{x:`16`,y:`216`,class:`head`,"text-anchor":`start`},`Artificial neuron`,-1),o(`g`,I,[o(`g`,{class:g({"is-on":U(`dend`)}),onClick:n[6]||=e=>V.value=`dend`},[...n[24]||=[o(`circle`,{cx:`52`,cy:`248`,r:`15`,class:`unit`},null,-1),o(`text`,{x:`52`,y:`253`,class:`val`},`x₁`,-1),o(`circle`,{cx:`52`,cy:`292`,r:`15`,class:`unit`},null,-1),o(`text`,{x:`52`,y:`297`,class:`val`},`x₂`,-1),o(`circle`,{cx:`52`,cy:`336`,r:`15`,class:`unit`},null,-1),o(`text`,{x:`52`,y:`341`,class:`val`},`x₃`,-1)]],2),o(`g`,{class:g({"is-on":U(`syn`)}),onClick:n[7]||=e=>V.value=`syn`},[...n[25]||=[o(`line`,{x1:`67`,y1:`248`,x2:`176`,y2:`285`,class:`wire`},null,-1),o(`line`,{x1:`67`,y1:`292`,x2:`176`,y2:`292`,class:`wire`},null,-1),o(`line`,{x1:`67`,y1:`336`,x2:`176`,y2:`299`,class:`wire`},null,-1),o(`text`,{x:`112`,y:`258`,class:`val is-small`},`w₁`,-1),o(`text`,{x:`112`,y:`286`,class:`val is-small`},`w₂`,-1),o(`text`,{x:`112`,y:`330`,class:`val is-small`},`w₃`,-1)]],2),o(`g`,{class:g({"is-on":U(`hill`)}),onClick:n[8]||=e=>V.value=`hill`},[...n[26]||=[o(`circle`,{cx:`150`,cy:`240`,r:`14`,class:`unit`},null,-1),o(`text`,{x:`150`,y:`245`,class:`val`},`b`,-1),o(`line`,{x1:`161`,y1:`250`,x2:`187`,y2:`272`,class:`wire`},null,-1)]],2),o(`g`,{class:g({"is-on":U(`soma`)}),onClick:n[9]||=e=>V.value=`soma`},[...n[27]||=[o(`circle`,{cx:`200`,cy:`292`,r:`24`,class:`unit is-op`},null,-1),o(`text`,{x:`200`,y:`300`,class:`val is-big`},`Σ`,-1),o(`text`,{x:`200`,y:`337`,class:`val is-small`},`z = wᵀx + b`,-1)]],2),o(`g`,{class:g({"is-on":U(`axon`)}),onClick:n[10]||=e=>V.value=`axon`},[n[28]||=o(`line`,{x1:`224`,y1:`292`,x2:`292`,y2:`292`,class:`wire`},null,-1),n[29]||=o(`circle`,{cx:`318`,cy:`292`,r:`24`,class:`unit is-op`},null,-1),_(` A step glyph inside the node, so σ is not just a Greek letter. `),n[30]||=o(`path`,{d:`M304,300 L318,300 L318,282 L332,282`,class:`glyph`},null,-1),n[31]||=o(`text`,{x:`318`,y:`337`,class:`val is-small`},`σ(z)`,-1)],2),o(`g`,{class:g({"is-on":U(`term`)}),onClick:n[11]||=e=>V.value=`term`},[...n[32]||=[o(`line`,{x1:`342`,y1:`292`,x2:`430`,y2:`292`,class:`wire`},null,-1),o(`text`,{x:`386`,y:`282`,class:`val is-small`},`ŷ`,-1),o(`line`,{x1:`430`,y1:`292`,x2:`530`,y2:`248`,class:`wire`},null,-1),o(`line`,{x1:`430`,y1:`292`,x2:`530`,y2:`292`,class:`wire`},null,-1),o(`line`,{x1:`430`,y1:`292`,x2:`530`,y2:`336`,class:`wire`},null,-1),o(`circle`,{cx:`545`,cy:`248`,r:`15`,class:`unit`},null,-1),o(`circle`,{cx:`545`,cy:`292`,r:`15`,class:`unit`},null,-1),o(`circle`,{cx:`545`,cy:`336`,r:`15`,class:`unit`},null,-1),o(`text`,{x:`616`,y:`297`,class:`val is-small`},`next layer`,-1)]],2)])]))]),_:1})}}}),[[`__scopeId`,`data-v-b825edcd`]]),H={class:`mt-3`},U={__name:`slides.md__slidev_4`,setup(t){let{$slidev:i,$nav:s,$clicksContext:l,$clicks:u,$page:d,$renderContext:h,$frontmatter:g}=y();return l.setup(),(t,i)=>{let s=V,l=w;return a(),p(S,r(n(c(b)(c(g),3))),{aside:f(t=>[i[0]||=o(`p`,null,`Click a part: it highlights in both diagrams at once.`,-1),i[1]||=o(`p`,null,[e(`The two usually left out matter most. A spike starts at the `),o(`strong`,null,`axon hillock`),e(`, and only past a threshold — which becomes the `),o(`strong`,null,`bias`),e(`. The spike is `),o(`strong`,null,`all-or-none`),e(` — which is the unit step.`)],-1),i[2]||=o(`div`,{class:`mt-3 dl-secondary`},` Read the red line each time: a caricature of a nerve cell, not a model of one. `,-1),o(`div`,H,[m(l,{source:`Kandel et al., Principles of Neural Science`})])]),default:f(()=>[m(s)]),_:1},16)}}};export{U as default};
|