const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-DdsVhrNT.js","./modules/shiki-ZbpftOCw.js","./rolldown-runtime-hePW80VL.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./slidev/context-Dg_28hwb.js","./modules/vue-DZSojjrY.js","./md-CYXxUBJM.css","./md-B7lGhEuR.js","./slidev/VClicks-l0jZV8Zg.js","./index-DA2poVkj.js","./syncState-DVdyrqvA.js","./index-BUWRHKMm.css","./default-C3zMja2v.js","./DeckFooter-6-dHlE3F.js","./slidev/client-DYM4e_rl.js","./useDrawings-BsCw7kxF.js","./DeckFooter-B6vKMo6W.css","./default-DFJXHcku.css","./Citation-C2mQSZCj.js","./Citation-rca7ok54.css","./md-7lDxlpo1.js","./section-aKS-bwdz.js","./section-BZ9Dfv_4.css","./md-Cl3pAsU7.js","./interactive--xmYYvz-.js","./interactive-DDMF3hhv.css","./useRandom-CKuF3nnJ.js","./md-BYiXaZfk.css","./md-jmuWQE5-.js","./md-Bt0SEe9U.js","./Katex-bEnhXSDx.js","./Katex-CsYFnUYi.css","./md-BlW7fxDD.css","./md-BNoRCXVZ.js","./md-DdSLNFT6.js","./slidev/KaTexBlockWrapper-BOQji8kD.js","./md-D_0_Go3H.js","./md-iy_daGq9.js","./md-xXIaKWiw.js","./md-BtysGq6-.js","./PerceptronPlayground-B3aJX6mT.js","./StepButton-DiDduF86.js","./StepButton-C1ItLUkw.css","./Slider-rBweDD_5.js","./Slider-BO0rW71G.css","./PlotPoints-BmurSwXE.js","./PlotPoints-CqvvWTZs.css","./PlotLabel-B6EzJW_Y.js","./PlotLine-Bd5mLe7q.js","./PlotCurve-D4pyGHKn.js","./PerceptronPlayground-CzG5dsRu.css","./md-BLD5nLBc.js","./md-BF3AqBlu.js","./md-liLJDuSS.js","./PerceptronDiagram-CmZJT5ND.js","./PerceptronDiagram-NkK4Qr8p.css","./md-CmzPk6Fb.js","./md-DmE9cahr.js","./md-D-lEFP1h.js","./md-DBzEGsGz.js","./md-CGp3oyRC.js","./md-DZeep1df2.js","./md-CK-2SOMM.js","./md-DG1XS2Le2.js","./md-CzTMkz6z.css","./md-CBkiQdVT.js","./md-Wlx4vgm5.js","./md-_4SmusPY.js","./md-FY-Uvp0B.js","./md-DWafeZMQ.css","./md-Bv7Je2J8.js","./md-DR405M3b.js","./md-C8lEeNrC.js","./md-Bb3RBvlb.js","./md-Bdar9RKb.js","./md-DhBL7PRR.css","./md-C4-Bg5un2.js","./md-CZnahp6h2.js","./md-Fg24SpPs.css","./md-BBQmf_mI2.js","./md-zgvpk2-m2.js","./slidev/CodeBlockWrapper-BlQf_YBT.js","./modules/unplugin-icons-DgelL-FV.js","./md-DqIpam-Q2.js","./md-B3UgphXe2.js","./md-B8SnQrGe.js","./MLPDiagram-BzsWpYDE.js","./MLPDiagram-gYXOc7eY.css","./md-CuQ-IFDN.js","./md-BHHXbQ13.css","./md-BdLjP6lQ.js","./md-pSfHEcnu.js","./md-C9QTaqTf.js","./md-BgkY7HbW.js","./md-5DLtPaNo.css","./md-qokjNaVE.js","./md-BmlYDvkZ.css","./md-SN0beYJ8.js","./md-DE2QGCpb.css"])))=>i.map(i=>d[i]); import{A as e,B as t,E as n,F as r,Q as i,T as a,V as o,_ as s,b as c,bt as l,ft as u,g as d,gt as ee,ht as f,m as te,ot as ne,pt as p,ut as m,wt as re,y as ie,yt as ae,z as oe}from"./modules/shiki-ZbpftOCw.js";import{t as se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{A as ce,B as le,D as ue,E as de,L as fe,V as pe,_ as me,a as he,c as ge,g as h,h as _e,j as ve,l as ye}from"./modules/vue-DZSojjrY.js";import{l as be,y as xe}from"./slidev/context-Dg_28hwb.js";function Se(e,t,n){return Math.min(n,Math.max(t,e))}function Ce(...e){return Te(e).reduce((e,t)=>e+t,0)}function we(e){return e??=[],Array.isArray(e)?e:[e]}function Te(e){return we(e).flat(1)}function Ee(e){return Array.from(new Set(e))}function De(...e){let t,n,r;e.length===1?(t=0,r=1,[n]=e):[t,n,r=1]=e;let i=[],a=t;for(;at(e,n)).filter(Oe))}var g={theme:`dl2026`,title:`Basics of Neural Networks`,titleTemplate:`%s - Slidev`,addons:[`dl2026`],remoteAssets:!1,monaco:!0,monacoTypesSource:`local`,monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],monacoRunUseStrict:!0,download:`./slides.pdf`,export:{},info:`

PGR207 Deep Learning 2026 — Lecture 02

`,highlighter:`shiki`,twoslash:!0,lineNumbers:!1,colorSchema:`auto`,routerMode:`hash`,aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:``,selectable:!1,themeConfig:{courseCode:`PGR207`,lecture:`02`,lectureTitle:`Basics of Neural Networks`},fonts:{sans:[`"Inter"`,`ui-sans-serif`,`system-ui`,`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`"Noto Sans"`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`"Source Serif 4"`,`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`"JetBrains Mono"`,`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`],webfonts:[`Inter`,`Source Serif 4`,`JetBrains Mono`],provider:`google`,local:[],italic:!1,weights:[`200`,`400`,`600`]},favicon:`https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png`,drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:`https://www.plantuml.com/plantuml`,codeCopy:!0,magicMoveCopy:!0,author:`Vajira Thambawita`,record:`dev`,css:`unocss`,presenter:!0,browserExporter:`dev`,htmlAttrs:{},transition:`slide-left`,editor:!0,mcp:!0,contextMenu:null,wakeLock:!0,pwa:!1,mdc:!0,comark:!1,seoMeta:{},notesAutoRuby:{},duration:`30min`,timer:`stopwatch`,magicMoveDuration:800,preloadImages:!0,clickAnimation:``,layout:`title`,courseCode:`PGR207`,lecture:`02`,email:`vajira@simula.no`,slidesTitle:`Basics of Neural Networks - Slidev`},Ae=`build`,je=d(()=>g.aspectRatio),Me=d(()=>g.canvasWidth),Ne=d(()=>Math.ceil(Me.value/je.value)),Pe=d(()=>ke(g.themeConfig||{},(e,t)=>[`--slidev-theme-${e}`,t])),Fe=g.slidesTitle,Ie=`./#/`,Le=`modulepreload`,Re=function(e,t){return new URL(e,t).href},ze={},_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Re(t,n),t=s(t),t in ze)return;ze[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Le,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Be(e){if(e===!1||e===`false`)return null;if(e==null||e===!0||e===`true`)return`+1`;if(typeof e==`string`&&`+-`.includes(e[0]))return e;let t=+e;return Number.isNaN(t)?(console.error(`Invalid "at" prop value: ${e}`),null):t<=0?(console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${e}, has been set to 1`),1):t}function Ve(e){return Array.isArray(e)?[Be(e[0]),Be(e[1])]:null}function He(e,n=0,r){let i=u(!1),a=new Map,o=new Map,s={get current(){return Se(+e.value,n,s.total)},set current(t){e.value=i.value?Se(t,n,s.total):t},clicksStart:n,get relativeSizeMap(){return a},get maxMap(){return o},get isMounted(){return i.value},setup(){oe(()=>{i.value=!0,o=p(o),ne(e)||(s.current=e.value)}),t(()=>{i.value=!1,a=new Map,o=new Map})},calculateSince(e,t=1){let n=Be(e);if(n==null)return null;let r,i,a;if(typeof n==`string`){let e=s.currentOffset,o=+n;r=e+o,i=e+o+t-1,a=o+t-1}else r=n,i=n+t-1,a=0;return{start:r,end:1/0,max:i,delta:a,currentOffset:d(()=>s.current-r),isCurrent:d(()=>s.current===r),isActive:d(()=>s.current>=r)}},calculateRange(e){let t=Ve(e);if(t==null)return null;let[n,r]=t,i,a,o;return typeof n==`string`?(i=s.currentOffset+ +n,o=+n):(i=n,o=0),typeof r==`string`?(a=i+ +r,o+=+r):a=r,{start:i,end:a,max:a,delta:o,currentOffset:d(()=>s.current-i),isCurrent:d(()=>s.current===i),isActive:d(()=>i<=s.current&&s.currentae(t),e=>{r.value=Math.max(e,n)}),He(r,n,e?.meta?.clicks)}var We=/[a-z]/i;function Ge(e){if(typeof e==`number`)return{seconds:e,relative:!1};let t=e.startsWith(`+`);t&&(e=e.slice(1));let n=0;if(e.includes(`:`)){let t=e.split(`:`).map(Number),r=0,i=0,a=0;if(t.length===3)r=t[0],i=t[1],a=t[2];else if(t.length===2)i=t[0],a=t[1];else if(t.length===1)a=t[0];else throw TypeError(`Invalid timestamp format`);if(Number.isNaN(r)||Number.isNaN(i)||Number.isNaN(a))throw TypeError(`Invalid timestamp format`);n=(r||0)*3600+(i||0)*60+(a||0)}else if(!We.test(e))n=Number(e);else{let t={s:1,sec:1,secs:1,m:60,min:60,mins:60,h:3600,hr:3600,hrs:3600,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2629746,months:2629746,year:31556952,years:31556952},r=/([\d.]+)([a-z]+)/gi,i=e.matchAll(r);if(i)for(let e of i){let r=Number(e[1]);if(Number.isNaN(r))throw TypeError(`Invalid timestamp value: ${e[1]}`);let i=e[2].toLowerCase();if(!(i in t))throw TypeError(`Invalid timestamp unit: ${i}`);n+=r*t[i]}let a=e.replace(r,``).trim();if(a)throw TypeError(`Unknown timestamp remaining: ${a}`)}return{seconds:n,relative:t}}function Ke(e,t){if(!t||t===`all`||t===`*`)return De(1,e+1);if(t===`none`)return[];let n=[];for(let r of t.split(/[,;]/g))if(!r.includes(`-`))n.push(+r);else{let[t,i]=r.split(`-`,2);n.push(...De(+t,i?+i+1:e+1))}return Ee(n).filter(t=>t<=e).sort((e,t)=>e-t)}var qe={},Je={class:`px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono`};function Ye(e,t){return o(),c(`div`,Je,re(`Failed to fetch this slide. Please check your network connection.`))}var v=se(qe,[[`render`,Ye]]),Xe={class:`h-full w-full flex items-center justify-center gap-2 slidev-slide-loading`},Ze=n({__name:`SlideLoading`,setup(e){let t=u(!1);return oe(()=>{setTimeout(()=>{t.value=!0},200)}),(e,n)=>(o(),c(`div`,Xe,[t.value?(o(),c(te,{key:0},[n[0]||=s(`div`,{class:`i-svg-spinners-90-ring-with-bg text-xl`},null,-1),n[1]||=s(`div`,null,`Loading slide...`,-1)],64)):ie(`v-if`,!0)]))}}),y=m({theme:`dl2026`,addons:[`dl2026`],title:`Basics of Neural Networks`,info:`PGR207 Deep Learning 2026 — Lecture 02`,author:`Vajira Thambawita`,routerMode:`hash`,transition:`slide-left`,mdc:!0,themeConfig:{courseCode:`PGR207`,lecture:`02`,lectureTitle:`Basics of Neural Networks`},layout:`title`,courseCode:`PGR207`,lecture:`02`,email:`vajira@simula.no`}),Qe=p({get layout(){return y.layout},get transition(){return y.transition},get class(){return y.class},get clicks(){return y.clicks},get name(){return y.name},get preload(){return y.preload},slide:{content:``,revision:`-fvs3dx`,frontmatterRaw:`theme: dl2026 addons: - dl2026 title: Basics of Neural Networks info: PGR207 Deep Learning 2026 — Lecture 02 author: Vajira Thambawita routerMode: hash transition: slide-left mdc: true themeConfig: courseCode: PGR207 lecture: "02" lectureTitle: Basics of Neural Networks layout: title courseCode: PGR207 lecture: "02" email: vajira@simula.no `,note:``,title:`Basics of Neural Networks`,index:0,noteHTML:``,images:[],raw:``,frontmatter:y,filepath:``,start:0,sourceIndex:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),b=m({layout:`default`,title:`Outline`}),$e=p({get layout(){return b.layout},get transition(){return b.transition},get class(){return b.class},get clicks(){return b.clicks},get name(){return b.name},get preload(){return b.preload},slide:{content:``,revision:`-hl1sv`,frontmatterRaw:`layout: default title: Outline `,note:``,title:`Outline`,index:1,noteHTML:``,images:[],raw:``,frontmatter:b,filepath:``,start:29,sourceIndex:1,id:1,no:2},__clicksContext:null,__preloaded:!1}),x=m({layout:`section`,index:`01`}),et=p({get layout(){return x.layout},get transition(){return x.transition},get class(){return x.class},get clicks(){return x.clicks},get name(){return x.name},get preload(){return x.preload},slide:{content:``,revision:`-7anjdt`,frontmatterRaw:`layout: section index: "01" `,note:``,title:`Artificial neurons`,level:1,index:2,noteHTML:``,images:[],raw:``,frontmatter:x,filepath:``,start:47,sourceIndex:2,id:2,no:3},__clicksContext:null,__preloaded:!1}),S=m({layout:`interactive`,title:`The biological neuron, and what we kept`,"aside-width":`16rem`}),tt=p({get layout(){return S.layout},get transition(){return S.transition},get class(){return S.class},get clicks(){return S.clicks},get name(){return S.name},get preload(){return S.preload},slide:{content:``,revision:`vylzt1`,frontmatterRaw:`layout: interactive title: The biological neuron, and what we kept aside-width: 16rem `,note:``,title:`The biological neuron, and what we kept`,index:3,noteHTML:``,images:[],raw:``,frontmatter:S,filepath:``,start:54,sourceIndex:3,id:3,no:4},__clicksContext:null,__preloaded:!1}),C=m({layout:`default`,title:`History of the artificial neuron`}),nt=p({get layout(){return C.layout},get transition(){return C.transition},get class(){return C.class},get clicks(){return C.clicks},get name(){return C.name},get preload(){return C.preload},slide:{content:``,revision:`-ab627x`,frontmatterRaw:`layout: default title: History of the artificial neuron `,note:``,title:`History of the artificial neuron`,index:4,noteHTML:``,images:[],raw:``,frontmatter:C,filepath:``,start:84,sourceIndex:4,id:4,no:5},__clicksContext:null,__preloaded:!1}),w=m({layout:`interactive`,title:`A sample dataset — Iris`,"aside-width":`12rem`}),rt=p({get layout(){return w.layout},get transition(){return w.transition},get class(){return w.class},get clicks(){return w.clicks},get name(){return w.name},get preload(){return w.preload},slide:{content:``,revision:`lsqh4x`,frontmatterRaw:`layout: interactive title: A sample dataset — Iris aside-width: 12rem `,note:``,title:`A sample dataset — Iris`,index:5,noteHTML:``,images:[`./figures/iris-setosa.jpg`,`./figures/iris-versicolor.jpg`,`./figures/iris-virginica.jpg`],raw:``,frontmatter:w,filepath:``,start:119,sourceIndex:5,id:5,no:6},__clicksContext:null,__preloaded:!1}),T=m({layout:`default`,title:`The Iris data, as a table`}),it=p({get layout(){return T.layout},get transition(){return T.transition},get class(){return T.class},get clicks(){return T.clicks},get name(){return T.name},get preload(){return T.preload},slide:{content:``,revision:`-q4ys1i`,frontmatterRaw:`layout: default title: The Iris data, as a table `,note:``,title:`The Iris data, as a table`,index:6,noteHTML:``,images:[],raw:``,frontmatter:T,filepath:``,start:152,sourceIndex:6,id:6,no:7},__clicksContext:null,__preloaded:!1}),E=m({layout:`default`,title:`The notation`}),at=p({get layout(){return E.layout},get transition(){return E.transition},get class(){return E.class},get clicks(){return E.clicks},get name(){return E.name},get preload(){return E.preload},slide:{content:``,revision:`-664asj`,frontmatterRaw:`layout: default title: The notation `,note:``,title:`The notation`,index:7,noteHTML:``,images:[],raw:``,frontmatter:E,filepath:``,start:220,sourceIndex:7,id:7,no:8},__clicksContext:null,__preloaded:!1}),D=m({layout:`default`,title:`The formal definition of an artificial neuron`}),ot=p({get layout(){return D.layout},get transition(){return D.transition},get class(){return D.class},get clicks(){return D.clicks},get name(){return D.name},get preload(){return D.preload},slide:{content:``,revision:`-3su0ht`,frontmatterRaw:`layout: default title: The formal definition of an artificial neuron `,note:``,title:`The formal definition of an artificial neuron`,index:8,noteHTML:``,images:[],raw:``,frontmatter:D,filepath:``,start:273,sourceIndex:8,id:8,no:9},__clicksContext:null,__preloaded:!1}),O=m({layout:`default`,title:`Reading the equation: the artificial neuron`}),st=p({get layout(){return O.layout},get transition(){return O.transition},get class(){return O.class},get clicks(){return O.clicks},get name(){return O.name},get preload(){return O.preload},slide:{content:``,revision:`h1kumu`,frontmatterRaw:`layout: default title: "Reading the equation: the artificial neuron" `,note:``,title:`Reading the equation: the artificial neuron`,index:9,noteHTML:``,images:[],raw:``,frontmatter:O,filepath:``,start:323,sourceIndex:9,id:9,no:10},__clicksContext:null,__preloaded:!1}),k=m({layout:`default`,title:`From threshold to bias`}),ct=p({get layout(){return k.layout},get transition(){return k.transition},get class(){return k.class},get clicks(){return k.clicks},get name(){return k.name},get preload(){return k.preload},slide:{content:``,revision:`-aqkszt`,frontmatterRaw:`layout: default title: From threshold to bias `,note:``,title:`From threshold to bias`,index:10,noteHTML:``,images:[],raw:``,frontmatter:k,filepath:``,start:411,sourceIndex:10,id:10,no:11},__clicksContext:null,__preloaded:!1}),A=m({layout:`interactive`,title:`The decision function of the perceptron`,"aside-width":`13rem`}),lt=p({get layout(){return A.layout},get transition(){return A.transition},get class(){return A.class},get clicks(){return A.clicks},get name(){return A.name},get preload(){return A.preload},slide:{content:``,revision:`3ejgh9`,frontmatterRaw:`layout: interactive title: The decision function of the perceptron aside-width: 13rem `,note:``,title:`The decision function of the perceptron`,index:11,noteHTML:``,images:[],raw:``,frontmatter:A,filepath:``,start:471,sourceIndex:11,id:11,no:12},__clicksContext:null,__preloaded:!1}),j=m({layout:`default`,title:`The perceptron learning rule`}),ut=p({get layout(){return j.layout},get transition(){return j.transition},get class(){return j.class},get clicks(){return j.clicks},get name(){return j.name},get preload(){return j.preload},slide:{content:``,revision:`vlvzqp`,frontmatterRaw:`layout: default title: The perceptron learning rule `,note:``,title:`The perceptron learning rule`,index:12,noteHTML:``,images:[],raw:``,frontmatter:j,filepath:``,start:492,sourceIndex:12,id:12,no:13},__clicksContext:null,__preloaded:!1}),M=m({layout:`default`,title:`Reading the equation: the perceptron update`}),dt=p({get layout(){return M.layout},get transition(){return M.transition},get class(){return M.class},get clicks(){return M.clicks},get name(){return M.name},get preload(){return M.preload},slide:{content:``,revision:`e2hfy2`,frontmatterRaw:`layout: default title: "Reading the equation: the perceptron update" `,note:``,title:`Reading the equation: the perceptron update`,index:13,noteHTML:``,images:[],raw:``,frontmatter:M,filepath:``,start:527,sourceIndex:13,id:13,no:14},__clicksContext:null,__preloaded:!1}),N=m({layout:`interactive`,title:`The whole perceptron, error loop included`,"aside-width":`13rem`}),ft=p({get layout(){return N.layout},get transition(){return N.transition},get class(){return N.class},get clicks(){return N.clicks},get name(){return N.name},get preload(){return N.preload},slide:{content:``,revision:`lwzwbj`,frontmatterRaw:`layout: interactive title: The whole perceptron, error loop included aside-width: 13rem `,note:``,title:`The whole perceptron, error loop included`,index:14,noteHTML:``,images:[],raw:``,frontmatter:N,filepath:``,start:615,sourceIndex:14,id:14,no:15},__clicksContext:null,__preloaded:!1}),P=m({layout:`default`,title:`Example (1/2) — correct predictions`}),pt=p({get layout(){return P.layout},get transition(){return P.transition},get class(){return P.class},get clicks(){return P.clicks},get name(){return P.name},get preload(){return P.preload},slide:{content:``,revision:`7vcd90`,frontmatterRaw:`layout: default title: Example (1/2) — correct predictions `,note:``,title:`Example (1/2) — correct predictions`,index:15,noteHTML:``,images:[],raw:``,frontmatter:P,filepath:``,start:640,sourceIndex:15,id:15,no:16},__clicksContext:null,__preloaded:!1}),F=m({layout:`default`,title:`Example (2/2) — wrong predictions`}),mt=p({get layout(){return F.layout},get transition(){return F.transition},get class(){return F.class},get clicks(){return F.clicks},get name(){return F.name},get preload(){return F.preload},slide:{content:``,revision:`v39lm8`,frontmatterRaw:`layout: default title: Example (2/2) — wrong predictions `,note:``,title:`Example (2/2) — wrong predictions`,index:16,noteHTML:``,images:[],raw:``,frontmatter:F,filepath:``,start:690,sourceIndex:16,id:16,no:17},__clicksContext:null,__preloaded:!1}),I=m({layout:`default`,title:`The size of the correction`}),ht=p({get layout(){return I.layout},get transition(){return I.transition},get class(){return I.class},get clicks(){return I.clicks},get name(){return I.name},get preload(){return I.preload},slide:{content:``,revision:`76rrib`,frontmatterRaw:`layout: default title: The size of the correction `,note:``,title:`The size of the correction`,index:17,noteHTML:``,images:[],raw:``,frontmatter:I,filepath:``,start:732,sourceIndex:17,id:17,no:18},__clicksContext:null,__preloaded:!1}),L=m({layout:`interactive`,title:`The perceptron learning rule, running`,"aside-width":`17rem`}),gt=p({get layout(){return L.layout},get transition(){return L.transition},get class(){return L.class},get clicks(){return L.clicks},get name(){return L.name},get preload(){return L.preload},slide:{content:``,revision:`avae6g`,frontmatterRaw:`layout: interactive title: The perceptron learning rule, running aside-width: 17rem `,note:``,title:`The perceptron learning rule, running`,index:18,noteHTML:``,images:[],raw:``,frontmatter:L,filepath:``,start:776,sourceIndex:18,id:18,no:19},__clicksContext:null,__preloaded:!1}),_t=m({layout:`interactive`,title:`The big picture`,"aside-width":`15rem`}),vt=p({get layout(){return _t.layout},get transition(){return _t.transition},get class(){return _t.class},get clicks(){return _t.clicks},get name(){return _t.name},get preload(){return _t.preload},slide:{content:``,revision:`qnoadu`,frontmatterRaw:`layout: interactive title: The big picture aside-width: 15rem `,note:``,title:`The big picture`,index:19,noteHTML:``,images:[],raw:``,frontmatter:_t,filepath:``,start:792,sourceIndex:19,id:19,no:20},__clicksContext:null,__preloaded:!1}),R=m({layout:`section`,index:`02`}),yt=p({get layout(){return R.layout},get transition(){return R.transition},get class(){return R.class},get clicks(){return R.clicks},get name(){return R.name},get preload(){return R.preload},slide:{content:``,revision:`lqrz54`,frontmatterRaw:`layout: section index: "02" `,note:``,title:`ADAptive LInear NEuron`,level:1,index:20,noteHTML:``,images:[],raw:``,frontmatter:R,filepath:``,start:825,sourceIndex:20,id:20,no:21},__clicksContext:null,__preloaded:!1}),z=m({layout:`default`,title:`ADALINE`}),bt=p({get layout(){return z.layout},get transition(){return z.transition},get class(){return z.class},get clicks(){return z.clicks},get name(){return z.name},get preload(){return z.preload},slide:{content:``,revision:`4w32n7`,frontmatterRaw:`layout: default title: ADALINE `,note:``,title:`ADALINE`,index:21,noteHTML:``,images:[],raw:``,frontmatter:z,filepath:``,start:832,sourceIndex:21,id:21,no:22},__clicksContext:null,__preloaded:!1}),B=m({layout:`interactive`,title:`Perceptron vs Adaline`,"aside-width":`11rem`}),xt=p({get layout(){return B.layout},get transition(){return B.transition},get class(){return B.class},get clicks(){return B.clicks},get name(){return B.name},get preload(){return B.preload},slide:{content:``,revision:`-t75q2i`,frontmatterRaw:`layout: interactive title: Perceptron vs Adaline aside-width: 11rem `,note:``,title:`Perceptron vs Adaline`,index:22,noteHTML:``,images:[],raw:``,frontmatter:B,filepath:``,start:850,sourceIndex:22,id:22,no:23},__clicksContext:null,__preloaded:!1}),V=m({layout:`default`,title:`Perceptron vs Adaline — the differences`}),St=p({get layout(){return V.layout},get transition(){return V.transition},get class(){return V.class},get clicks(){return V.clicks},get name(){return V.name},get preload(){return V.preload},slide:{content:``,revision:`jw4jol`,frontmatterRaw:`layout: default title: Perceptron vs Adaline — the differences `,note:``,title:`Perceptron vs Adaline — the differences`,index:23,noteHTML:``,images:[],raw:``,frontmatter:V,filepath:``,start:867,sourceIndex:23,id:23,no:24},__clicksContext:null,__preloaded:!1}),H=m({layout:`default`,title:`Minimising the loss function`}),Ct=p({get layout(){return H.layout},get transition(){return H.transition},get class(){return H.class},get clicks(){return H.clicks},get name(){return H.name},get preload(){return H.preload},slide:{content:``,revision:`-djaasa`,frontmatterRaw:`layout: default title: Minimising the loss function `,note:``,title:`Minimising the loss function`,index:24,noteHTML:``,images:[],raw:``,frontmatter:H,filepath:``,start:895,sourceIndex:24,id:24,no:25},__clicksContext:null,__preloaded:!1}),U=m({layout:`default`,title:`Reading the equation: the MSE loss`}),wt=p({get layout(){return U.layout},get transition(){return U.transition},get class(){return U.class},get clicks(){return U.clicks},get name(){return U.name},get preload(){return U.preload},slide:{content:``,revision:`ho66qa`,frontmatterRaw:`layout: default title: "Reading the equation: the MSE loss" `,note:``,title:`Reading the equation: the MSE loss`,index:25,noteHTML:``,images:[],raw:``,frontmatter:U,filepath:``,start:940,sourceIndex:25,id:25,no:26},__clicksContext:null,__preloaded:!1}),W=m({layout:`interactive`,title:`How gradient descent works`,"aside-width":`16rem`}),Tt=p({get layout(){return W.layout},get transition(){return W.transition},get class(){return W.class},get clicks(){return W.clicks},get name(){return W.name},get preload(){return W.preload},slide:{content:``,revision:`pgpja6`,frontmatterRaw:`layout: interactive title: How gradient descent works aside-width: 16rem `,note:``,title:`How gradient descent works`,index:26,noteHTML:``,images:[],raw:``,frontmatter:W,filepath:``,start:1021,sourceIndex:26,id:26,no:27},__clicksContext:null,__preloaded:!1}),G=m({layout:`default`,title:`The update, written out`}),Et=p({get layout(){return G.layout},get transition(){return G.transition},get class(){return G.class},get clicks(){return G.clicks},get name(){return G.name},get preload(){return G.preload},slide:{content:``,revision:`-9kblmu`,frontmatterRaw:`layout: default title: The update, written out `,note:``,title:`The update, written out`,index:27,noteHTML:``,images:[],raw:``,frontmatter:G,filepath:``,start:1038,sourceIndex:27,id:27,no:28},__clicksContext:null,__preloaded:!1}),K=m({layout:`default`,title:`Reading the equation: the gradient`}),Dt=p({get layout(){return K.layout},get transition(){return K.transition},get class(){return K.class},get clicks(){return K.clicks},get name(){return K.name},get preload(){return K.preload},slide:{content:``,revision:`rsm3iv`,frontmatterRaw:`layout: default title: "Reading the equation: the gradient" `,note:``,title:`Reading the equation: the gradient`,index:28,noteHTML:``,images:[],raw:``,frontmatter:K,filepath:``,start:1085,sourceIndex:28,id:28,no:29},__clicksContext:null,__preloaded:!1}),q=m({layout:`default`,title:`How do we calculate the MSE derivative?`}),Ot=p({get layout(){return q.layout},get transition(){return q.transition},get class(){return q.class},get clicks(){return q.clicks},get name(){return q.name},get preload(){return q.preload},slide:{content:``,revision:`4zqnze`,frontmatterRaw:`layout: default title: How do we calculate the MSE derivative? `,note:``,title:`How do we calculate the MSE derivative?`,index:29,noteHTML:``,images:[],raw:``,frontmatter:q,filepath:``,start:1173,sourceIndex:29,id:29,no:30},__clicksContext:null,__preloaded:!1}),J=m({layout:`default`,title:`Why Adaline`}),kt=p({get layout(){return J.layout},get transition(){return J.transition},get class(){return J.class},get clicks(){return J.clicks},get name(){return J.name},get preload(){return J.preload},slide:{content:``,revision:`-1jntxr`,frontmatterRaw:`layout: default title: Why Adaline `,note:``,title:`Why Adaline`,index:30,noteHTML:``,images:[],raw:``,frontmatter:J,filepath:``,start:1235,sourceIndex:30,id:30,no:31},__clicksContext:null,__preloaded:!1}),At=m({layout:`interactive`,title:`Feature scaling — standardisation`,"aside-width":`17rem`}),jt=p({get layout(){return At.layout},get transition(){return At.transition},get class(){return At.class},get clicks(){return At.clicks},get name(){return At.name},get preload(){return At.preload},slide:{content:``,revision:`-3n7vu3`,frontmatterRaw:`layout: interactive title: Feature scaling — standardisation aside-width: 17rem `,note:``,title:`Feature scaling — standardisation`,index:31,noteHTML:``,images:[],raw:``,frontmatter:At,filepath:``,start:1256,sourceIndex:31,id:31,no:32},__clicksContext:null,__preloaded:!1}),Mt=m({layout:`default`,title:`Reading the equation: standardisation`}),Nt=p({get layout(){return Mt.layout},get transition(){return Mt.transition},get class(){return Mt.class},get clicks(){return Mt.clicks},get name(){return Mt.name},get preload(){return Mt.preload},slide:{content:``,revision:`qn04bj`,frontmatterRaw:`layout: default title: "Reading the equation: standardisation" `,note:``,title:`Reading the equation: standardisation`,index:32,noteHTML:``,images:[],raw:``,frontmatter:Mt,filepath:``,start:1276,sourceIndex:32,id:32,no:33},__clicksContext:null,__preloaded:!1}),Pt=m({layout:`interactive`,title:`Large-scale ML and stochastic gradient descent`,"aside-width":`23rem`}),Ft=p({get layout(){return Pt.layout},get transition(){return Pt.transition},get class(){return Pt.class},get clicks(){return Pt.clicks},get name(){return Pt.name},get preload(){return Pt.preload},slide:{content:``,revision:`-5abb6q`,frontmatterRaw:`layout: interactive title: Large-scale ML and stochastic gradient descent aside-width: 23rem `,note:``,title:`Large-scale ML and stochastic gradient descent`,index:33,noteHTML:``,images:[],raw:``,frontmatter:Pt,filepath:``,start:1358,sourceIndex:33,id:33,no:34},__clicksContext:null,__preloaded:!1}),It=m({layout:`default`,title:`Reading the equation: a shrinking learning rate`}),Lt=p({get layout(){return It.layout},get transition(){return It.transition},get class(){return It.class},get clicks(){return It.clicks},get name(){return It.name},get preload(){return It.preload},slide:{content:``,revision:`-cn5jo`,frontmatterRaw:`layout: default title: "Reading the equation: a shrinking learning rate" `,note:``,title:`Reading the equation: a shrinking learning rate`,index:34,noteHTML:``,images:[],raw:``,frontmatter:It,filepath:``,start:1390,sourceIndex:34,id:34,no:35},__clicksContext:null,__preloaded:!1}),Rt=m({layout:`default`,title:`The perceptron, in code`}),zt=p({get layout(){return Rt.layout},get transition(){return Rt.transition},get class(){return Rt.class},get clicks(){return Rt.clicks},get name(){return Rt.name},get preload(){return Rt.preload},slide:{content:``,revision:`2vtl7j`,frontmatterRaw:`layout: default title: The perceptron, in code `,note:``,title:`The perceptron, in code`,index:35,noteHTML:``,images:[],raw:``,frontmatter:Rt,filepath:``,start:1472,sourceIndex:35,id:35,no:36},__clicksContext:null,__preloaded:!1}),Bt=m({layout:`default`,title:`Adaline, in code`}),Vt=p({get layout(){return Bt.layout},get transition(){return Bt.transition},get class(){return Bt.class},get clicks(){return Bt.clicks},get name(){return Bt.name},get preload(){return Bt.preload},slide:{content:``,revision:`-l92o4g`,frontmatterRaw:`layout: default title: Adaline, in code `,note:``,title:`Adaline, in code`,index:36,noteHTML:``,images:[],raw:``,frontmatter:Bt,filepath:``,start:1504,sourceIndex:36,id:36,no:37},__clicksContext:null,__preloaded:!1}),Y=m({layout:`section`,index:`03`}),Ht=p({get layout(){return Y.layout},get transition(){return Y.transition},get class(){return Y.class},get clicks(){return Y.clicks},get name(){return Y.name},get preload(){return Y.preload},slide:{content:``,revision:`ms5bbi`,frontmatterRaw:`layout: section index: "03" `,note:``,title:`Implementing a multilayer ANN from scratch`,level:1,index:37,noteHTML:``,images:[],raw:``,frontmatter:Y,filepath:``,start:1532,sourceIndex:37,id:37,no:38},__clicksContext:null,__preloaded:!1}),Ut=m({layout:`interactive`,title:`The multilayer perceptron`,"aside-width":`16rem`}),Wt=p({get layout(){return Ut.layout},get transition(){return Ut.transition},get class(){return Ut.class},get clicks(){return Ut.clicks},get name(){return Ut.name},get preload(){return Ut.preload},slide:{content:``,revision:`-v47pyc`,frontmatterRaw:`layout: interactive title: The multilayer perceptron aside-width: 16rem `,note:``,title:`The multilayer perceptron`,index:38,noteHTML:``,images:[],raw:``,frontmatter:Ut,filepath:``,start:1539,sourceIndex:38,id:38,no:39},__clicksContext:null,__preloaded:!1}),Gt=m({layout:`interactive`,title:`One-hot representation`,"aside-width":`15rem`}),Kt=p({get layout(){return Gt.layout},get transition(){return Gt.transition},get class(){return Gt.class},get clicks(){return Gt.clicks},get name(){return Gt.name},get preload(){return Gt.preload},slide:{content:``,revision:`b1i3qz`,frontmatterRaw:`layout: interactive title: One-hot representation aside-width: 15rem `,note:``,title:`One-hot representation`,index:39,noteHTML:``,images:[],raw:``,frontmatter:Gt,filepath:``,start:1563,sourceIndex:39,id:39,no:40},__clicksContext:null,__preloaded:!1}),qt=m({layout:`interactive`,title:`The MLP learning procedure`,"aside-width":`16rem`}),Jt=p({get layout(){return qt.layout},get transition(){return qt.transition},get class(){return qt.class},get clicks(){return qt.clicks},get name(){return qt.name},get preload(){return qt.preload},slide:{content:``,revision:`-5c12sm`,frontmatterRaw:`layout: interactive title: The MLP learning procedure aside-width: 16rem `,note:``,title:`The MLP learning procedure`,index:40,noteHTML:``,images:[],raw:``,frontmatter:qt,filepath:``,start:1576,sourceIndex:40,id:40,no:41},__clicksContext:null,__preloaded:!1}),Yt=m({layout:`default`,title:`Why the activation has to be non-linear`}),Xt=p({get layout(){return Yt.layout},get transition(){return Yt.transition},get class(){return Yt.class},get clicks(){return Yt.clicks},get name(){return Yt.name},get preload(){return Yt.preload},slide:{content:``,revision:`-z4ceku`,frontmatterRaw:`layout: default title: Why the activation has to be non-linear `,note:``,title:`Why the activation has to be non-linear`,index:41,noteHTML:``,images:[],raw:``,frontmatter:Yt,filepath:``,start:1600,sourceIndex:41,id:41,no:42},__clicksContext:null,__preloaded:!1}),Zt=m({layout:`default`,title:`Reading the equation: two linear layers`}),Qt=p({get layout(){return Zt.layout},get transition(){return Zt.transition},get class(){return Zt.class},get clicks(){return Zt.clicks},get name(){return Zt.name},get preload(){return Zt.preload},slide:{content:``,revision:`-3fr6ix`,frontmatterRaw:`layout: default title: "Reading the equation: two linear layers" `,note:``,title:`Reading the equation: two linear layers`,index:42,noteHTML:``,images:[],raw:``,frontmatter:Zt,filepath:``,start:1672,sourceIndex:42,id:42,no:43},__clicksContext:null,__preloaded:!1}),$t=m({layout:`figure`,title:`Example — labelling handwritten digits`}),en=p({get layout(){return $t.layout},get transition(){return $t.transition},get class(){return $t.class},get clicks(){return $t.clicks},get name(){return $t.name},get preload(){return $t.preload},slide:{content:``,revision:`-xe6z33`,frontmatterRaw:`layout: figure title: Example — labelling handwritten digits `,note:``,title:`Example — labelling handwritten digits`,index:43,noteHTML:``,images:[],raw:``,frontmatter:$t,filepath:``,start:1760,sourceIndex:43,id:43,no:44},__clicksContext:null,__preloaded:!1}),tn=m({layout:`interactive`,title:`Backpropagation`,"aside-width":`20rem`}),nn=p({get layout(){return tn.layout},get transition(){return tn.transition},get class(){return tn.class},get clicks(){return tn.clicks},get name(){return tn.name},get preload(){return tn.preload},slide:{content:``,revision:`-csmea4`,frontmatterRaw:`layout: interactive title: Backpropagation aside-width: 20rem `,note:``,title:`Backpropagation`,index:44,noteHTML:``,images:[],raw:``,frontmatter:tn,filepath:``,start:1782,sourceIndex:44,id:44,no:45},__clicksContext:null,__preloaded:!1}),X=m({layout:`end`,email:`vajira@simula.no`,next:`PyTorch for Deep Learning`}),rn=p({get layout(){return X.layout},get transition(){return X.transition},get class(){return X.class},get clicks(){return X.clicks},get name(){return X.name},get preload(){return X.preload},slide:{content:``,revision:`ufsc9z`,frontmatterRaw:`layout: end email: vajira@simula.no next: PyTorch for Deep Learning `,note:``,title:`To be continued…`,level:1,index:45,noteHTML:``,images:[],raw:``,frontmatter:X,filepath:``,start:1799,sourceIndex:45,id:45,no:46},__clicksContext:null,__preloaded:!1}),Z=Array(46),Q=(e,t)=>a({loader:t,delay:300,loadingComponent:Ze,errorComponent:v,onError:t=>console.error(`Failed to load slide `+(e+1),t)}),an=async()=>{try{return Z[0]??=await _(()=>import(`./md-DdsVhrNT.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},on=async()=>{try{return Z[1]??=await _(()=>import(`./md-B7lGhEuR.js`),__vite__mapDeps([8,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},sn=async()=>{try{return Z[2]??=await _(()=>import(`./md-7lDxlpo1.js`),__vite__mapDeps([21,1,2,3,5,6,22,4,23]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},cn=async()=>{try{return Z[3]??=await _(()=>import(`./md-Cl3pAsU7.js`),__vite__mapDeps([24,1,2,3,4,5,6,25,14,15,11,10,12,16,17,26,27,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ln=async()=>{try{return Z[4]??=await _(()=>import(`./md-jmuWQE5-.js`),__vite__mapDeps([29,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},un=async()=>{try{return Z[5]??=await _(()=>import(`./md-Bt0SEe9U.js`),__vite__mapDeps([30,1,2,3,4,5,6,25,14,15,11,10,12,16,17,26,31,32,33]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},dn=async()=>{try{return Z[6]??=await _(()=>import(`./md-BNoRCXVZ.js`),__vite__mapDeps([34,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18,31,32,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},fn=async()=>{try{return Z[7]??=await _(()=>import(`./md-DdSLNFT6.js`),__vite__mapDeps([35,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},pn=async()=>{try{return Z[8]??=await _(()=>import(`./md-D_0_Go3H.js`),__vite__mapDeps([37,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},mn=async()=>{try{return Z[9]??=await _(()=>import(`./md-iy_daGq9.js`),__vite__mapDeps([38,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},hn=async()=>{try{return Z[10]??=await _(()=>import(`./md-xXIaKWiw.js`),__vite__mapDeps([39,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},gn=async()=>{try{return Z[11]??=await _(()=>import(`./md-BtysGq6-.js`),__vite__mapDeps([40,1,2,3,5,6,25,4,14,15,11,10,12,16,17,26,41,31,32,42,43,44,45,46,47,48,49,50,27,51]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},_n=async()=>{try{return Z[12]??=await _(()=>import(`./md-BLD5nLBc.js`),__vite__mapDeps([52,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},vn=async()=>{try{return Z[13]??=await _(()=>import(`./md-BF3AqBlu.js`),__vite__mapDeps([53,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},yn=async()=>{try{return Z[14]??=await _(()=>import(`./md-liLJDuSS.js`),__vite__mapDeps([54,1,2,3,5,6,25,4,14,15,11,10,12,16,17,26,55,31,32,42,43,44,45,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},bn=async()=>{try{return Z[15]??=await _(()=>import(`./md-CmzPk6Fb.js`),__vite__mapDeps([57,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xn=async()=>{try{return Z[16]??=await _(()=>import(`./md-DmE9cahr.js`),__vite__mapDeps([58,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Sn=async()=>{try{return Z[17]??=await _(()=>import(`./md-D-lEFP1h.js`),__vite__mapDeps([59,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Cn=async()=>{try{return Z[18]??=await _(()=>import(`./md-DBzEGsGz.js`),__vite__mapDeps([60,1,2,3,5,6,25,4,14,15,11,10,12,16,17,26,41,31,32,42,43,44,45,46,47,48,49,50,27,51]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wn=async()=>{try{return Z[19]??=await _(()=>import(`./md-CGp3oyRC.js`),__vite__mapDeps([61,1,2,3,5,6,9,10,11,12,25,4,14,15,16,17,26,55,31,32,42,43,44,45,56]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Tn=async()=>{try{return Z[20]??=await _(()=>import(`./md-DZeep1df2.js`),__vite__mapDeps([62,1,2,3,5,6,22,4,23]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},En=async()=>{try{return Z[21]??=await _(()=>import(`./md-CK-2SOMM.js`),__vite__mapDeps([63,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Dn=async()=>{try{return Z[22]??=await _(()=>import(`./md-DG1XS2Le2.js`),__vite__mapDeps([64,1,2,3,4,5,6,25,14,15,11,10,12,16,17,26,65]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},On=async()=>{try{return Z[23]??=await _(()=>import(`./md-CBkiQdVT.js`),__vite__mapDeps([66,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},kn=async()=>{try{return Z[24]??=await _(()=>import(`./md-Wlx4vgm5.js`),__vite__mapDeps([67,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},An=async()=>{try{return Z[25]??=await _(()=>import(`./md-_4SmusPY.js`),__vite__mapDeps([68,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},jn=async()=>{try{return Z[26]??=await _(()=>import(`./md-FY-Uvp0B.js`),__vite__mapDeps([69,1,2,3,4,5,6,25,14,15,11,10,12,16,17,26,31,32,42,43,44,45,46,47,48,49,50,70]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Mn=async()=>{try{return Z[27]??=await _(()=>import(`./md-Bv7Je2J8.js`),__vite__mapDeps([71,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Nn=async()=>{try{return Z[28]??=await _(()=>import(`./md-DR405M3b.js`),__vite__mapDeps([72,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pn=async()=>{try{return Z[29]??=await _(()=>import(`./md-C8lEeNrC.js`),__vite__mapDeps([73,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fn=async()=>{try{return Z[30]??=await _(()=>import(`./md-Bb3RBvlb.js`),__vite__mapDeps([74,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},In=async()=>{try{return Z[31]??=await _(()=>import(`./md-Bdar9RKb.js`),__vite__mapDeps([75,1,2,3,4,5,6,36,10,11,12,25,14,15,16,17,26,31,32,42,43,46,47,27,76]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ln=async()=>{try{return Z[32]??=await _(()=>import(`./md-C4-Bg5un2.js`),__vite__mapDeps([77,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Rn=async()=>{try{return Z[33]??=await _(()=>import(`./md-CZnahp6h2.js`),__vite__mapDeps([78,1,2,3,4,5,6,36,10,11,12,25,14,15,16,17,26,42,43,46,47,50,27,79]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},zn=async()=>{try{return Z[34]??=await _(()=>import(`./md-BBQmf_mI2.js`),__vite__mapDeps([80,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Bn=async()=>{try{return Z[35]??=await _(()=>import(`./md-zgvpk2-m2.js`),__vite__mapDeps([81,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,19,20,82,83]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Vn=async()=>{try{return Z[36]??=await _(()=>import(`./md-DqIpam-Q2.js`),__vite__mapDeps([84,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,82,83]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Hn=async()=>{try{return Z[37]??=await _(()=>import(`./md-B3UgphXe2.js`),__vite__mapDeps([85,1,2,3,5,6,22,4,23]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Un=async()=>{try{return Z[38]??=await _(()=>import(`./md-B8SnQrGe.js`),__vite__mapDeps([86,1,2,3,5,6,25,4,14,15,11,10,12,16,17,26,87,31,32,42,43,27,88]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Wn=async()=>{try{return Z[39]??=await _(()=>import(`./md-CuQ-IFDN.js`),__vite__mapDeps([89,1,2,3,4,5,6,25,14,15,11,10,12,16,17,26,90]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Gn=async()=>{try{return Z[40]??=await _(()=>import(`./md-BdLjP6lQ.js`),__vite__mapDeps([91,1,2,3,5,6,9,10,11,12,25,4,14,15,16,17,26,87,31,32,42,43,27,88]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Kn=async()=>{try{return Z[41]??=await _(()=>import(`./md-pSfHEcnu.js`),__vite__mapDeps([92,1,2,3,5,6,13,4,14,15,11,10,12,16,17,18,36]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},qn=async()=>{try{return Z[42]??=await _(()=>import(`./md-C9QTaqTf.js`),__vite__mapDeps([93,1,2,3,5,6,9,10,11,12,13,4,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Jn=async()=>{try{return Z[43]??=await _(()=>import(`./md-BgkY7HbW.js`),__vite__mapDeps([94,1,2,3,4,5,6,14,15,11,10,12,16,17,19,20,95]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Yn=async()=>{try{return Z[44]??=await _(()=>import(`./md-qokjNaVE.js`),__vite__mapDeps([96,1,2,3,4,5,6,25,14,15,11,10,12,16,17,26,31,32,44,45,46,47,49,50,97]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Xn=async()=>{try{return Z[45]??=await _(()=>import(`./md-SN0beYJ8.js`),__vite__mapDeps([98,1,2,3,4,5,6,99]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Zn=[{no:1,meta:Qe,load:an,component:Q(0,an)},{no:2,meta:$e,load:on,component:Q(1,on)},{no:3,meta:et,load:sn,component:Q(2,sn)},{no:4,meta:tt,load:cn,component:Q(3,cn)},{no:5,meta:nt,load:ln,component:Q(4,ln)},{no:6,meta:rt,load:un,component:Q(5,un)},{no:7,meta:it,load:dn,component:Q(6,dn)},{no:8,meta:at,load:fn,component:Q(7,fn)},{no:9,meta:ot,load:pn,component:Q(8,pn)},{no:10,meta:st,load:mn,component:Q(9,mn)},{no:11,meta:ct,load:hn,component:Q(10,hn)},{no:12,meta:lt,load:gn,component:Q(11,gn)},{no:13,meta:ut,load:_n,component:Q(12,_n)},{no:14,meta:dt,load:vn,component:Q(13,vn)},{no:15,meta:ft,load:yn,component:Q(14,yn)},{no:16,meta:pt,load:bn,component:Q(15,bn)},{no:17,meta:mt,load:xn,component:Q(16,xn)},{no:18,meta:ht,load:Sn,component:Q(17,Sn)},{no:19,meta:gt,load:Cn,component:Q(18,Cn)},{no:20,meta:vt,load:wn,component:Q(19,wn)},{no:21,meta:yt,load:Tn,component:Q(20,Tn)},{no:22,meta:bt,load:En,component:Q(21,En)},{no:23,meta:xt,load:Dn,component:Q(22,Dn)},{no:24,meta:St,load:On,component:Q(23,On)},{no:25,meta:Ct,load:kn,component:Q(24,kn)},{no:26,meta:wt,load:An,component:Q(25,An)},{no:27,meta:Tt,load:jn,component:Q(26,jn)},{no:28,meta:Et,load:Mn,component:Q(27,Mn)},{no:29,meta:Dt,load:Nn,component:Q(28,Nn)},{no:30,meta:Ot,load:Pn,component:Q(29,Pn)},{no:31,meta:kt,load:Fn,component:Q(30,Fn)},{no:32,meta:jt,load:In,component:Q(31,In)},{no:33,meta:Nt,load:Ln,component:Q(32,Ln)},{no:34,meta:Ft,load:Rn,component:Q(33,Rn)},{no:35,meta:Lt,load:zn,component:Q(34,zn)},{no:36,meta:zt,load:Bn,component:Q(35,Bn)},{no:37,meta:Vt,load:Vn,component:Q(36,Vn)},{no:38,meta:Ht,load:Hn,component:Q(37,Hn)},{no:39,meta:Wt,load:Un,component:Q(38,Un)},{no:40,meta:Kt,load:Wn,component:Q(39,Wn)},{no:41,meta:Jt,load:Gn,component:Q(40,Gn)},{no:42,meta:Xt,load:Kn,component:Q(41,Kn)},{no:43,meta:Qt,load:qn,component:Q(42,qn)},{no:44,meta:en,load:Jn,component:Q(43,Jn)},{no:45,meta:nn,load:Yn,component:Q(44,Yn)},{no:46,meta:rn,load:Xn,component:Q(45,Xn)}],$=f(Zn);function Qn(e,t,{mode:n=`replace`}={}){let i=pe();return d({get(){let n=i.currentRoute.value.query[e];return n==null?t??null:Array.isArray(n)?n.filter(Boolean):n},set(a){r(()=>{(i.currentRoute.value.query[e]??t?.toString())!==a.toString()&&i[l(n)]({query:{...i.currentRoute.value.query,[e]:`${a}`===t?void 0:a}})})}})}function $n(e,t,n=!1){let r=e.meta.slide?.frontmatter.routeAlias??e.no;return n?`/export/${r}`:t?`/presenter/${r}`:`/${r}`}function er(e){return $.value.find(t=>t.no===+e||t.meta.slide?.frontmatter.routeAlias===e)}function tr(e,t,n=!1){return(typeof e==`number`||typeof e==`string`)&&(e=er(e)),$n(e,t,n)}var nr={"slide-left":`slide-left | slide-right`,"slide-right":`slide-right | slide-left`,"slide-up":`slide-up | slide-down`,"slide-down":`slide-down | slide-up`};function rr(e,t=!1){if(!e||(typeof e==`string`&&(e={name:e}),!e.name))return;let n=e.name.includes(`|`)?e.name:nr[e.name]||e.name;if(n.includes(`|`)){let[e,r]=n.split(`|`).map(e=>e.trim());n=t?r:e}if(n)return{...e,name:n}}function ir(e,t,n){let r=e>0?n?.meta?.transition:t?.meta?.transition;return r||=g.transition||void 0,rr(r,e<0)}var ar=u(!1),or=u(!1),sr=u(!1),cr=u(!1),lr=u(!1),ur=u(!1),dr=u(!0),fr=m(new Set),pr=d(()=>fr.size>0),mr=ye({xs:460,...he}),hr=de(),gr=me(),_r=d(()=>hr.height.value-hr.width.value/je.value>120),vr=_e(ve?document.body:null),yr=ge(),br=d(()=>[`INPUT`,`TEXTAREA`].includes(yr.value?.tagName||``)),xr=d(()=>[`BUTTON`,`A`].includes(yr.value?.tagName||``));h(`slidev-camera`,`default`,{listenToStorageChanges:!1}),h(`slidev-mic`,`default`,{listenToStorageChanges:!1});var Sr=h(`slidev-scale`,0),Cr=h(`slidev-wake-lock`,!0),wr=h(`slidev-hide-cursor-idle`,!0);h(`slidev-skip-export-pdf-tip`,!1),h(`slidev-export-capture-delay`,400,{listenToStorageChanges:!1});var Tr=h(`slidev-presenter-cursor`,!0,{listenToStorageChanges:!1}),Er=h(`slidev-cursor-style`,`cursor`,{listenToStorageChanges:!1});function Dr(){Tr.value=!Tr.value}var Or=h(`slidev-show-editor`,!1,{listenToStorageChanges:!1}),kr=h(`slidev-editor-vertical`,!1,{listenToStorageChanges:!1}),Ar=h(`slidev-editor-width`,ve?window.innerWidth*.4:318,{listenToStorageChanges:!1}),jr=h(`slidev-editor-height`,ve?window.innerHeight*.4:300,{listenToStorageChanges:!1}),Mr=f(null),Nr=h(`slidev-presenter-font-size`,1,{listenToStorageChanges:!1}),Pr=h(`slidev-presenter-layout`,1,{listenToStorageChanges:!1}),Fr={invert:!1,contrast:1,brightness:1,hueRotate:0,saturate:1,sepia:0},Ir=h(`slidev-viewer-css-filter`,Fr,{listenToStorageChanges:!1,mergeDefaults:!0,deep:!0}),Lr=d(()=>Object.keys(Fr).some(e=>Ir.value[e]!==Fr[e]));function Rr(){Pr.value+=1,Pr.value>3&&(Pr.value=1)}function zr(){Nr.value=Math.min(2,Nr.value+.1)}function Br(){Nr.value=Math.max(.5,Nr.value-.1)}var Vr=fe(cr),Hr=h(`slidev-sync-directions`,{viewerSend:!0,viewerReceive:!0,presenterSend:!0,presenterReceive:!0},{listenToStorageChanges:!1,mergeDefaults:!0});function Ur(e,t,n=1){let r=t.meta.slide.level??n;r&&r>n&&e.length>0?Ur(e[e.length-1].children,t,n+1):e.push({no:t.no,children:[],level:n,titleLevel:r,path:tr(t.meta.slide?.frontmatter?.routeAlias??t.no,!1),hideInToc:!!t.meta?.slide?.frontmatter?.hideInToc,title:t.meta?.slide?.title})}function Wr(e,t,n=!1,r,i){return e.map(e=>{let a={...e,active:e.no===i?.value,hasActiveParent:n};return a.children.length>0&&(a.children=Wr(a.children,t,a.active||a.hasActiveParent,a,i)),r&&(a.active||a.activeParent)&&(r.activeParent=!0),a})}function Gr(e,t=1){return e.filter(e=>!e.hideInToc).map(e=>({...e,children:Gr(e.children,t+1)}))}function Kr(e,t,n){let r=d(()=>e.value.filter(e=>e.meta?.slide?.title).reduce((e,t)=>(Ur(e,t),e),[])),i=d(()=>Wr(r.value,n.value,void 0,void 0,t));return d(()=>Gr(i.value))}function qr(e,t,n=u(0),r,a,o){let s=d(()=>$.value.length),c=u(0),l=u(0),ee=d(()=>tr(e.value,r.value)),f=d(()=>e.value.no),te=d(()=>e.value.meta?.layout||(f.value===1?`cover`:`default`)),ne=d(()=>e.value.meta.slide.frontmatter),p=d(()=>t.value.current),m=d(()=>t.value.clicksStart),re=d(()=>t.value.total),ie=d(()=>$.value[Math.min($.value.length,f.value+1)-1]),ae=d(()=>$.value[Math.max(1,f.value-1)-1]),oe=d(()=>f.value<$.value.length||p.valuef.value>1||p.value>0),ce=d(()=>a.value?void 0:ir(c.value,e.value,ae.value));i(e,(e,t)=>{c.value=e.no-t.no});async function le(e){return!1}let ue=Kr($,f,e);async function de(){l.value=1,re.value<=n.value?await pe():n.value+=1}async function fe(){l.value=-1,n.value<=m.value?await me(!0):--n.value}async function pe(e=!1){l.value=1,f.value<$.value.length&&await h(f.value+1,e&&!a.value?be:void 0)}async function me(e=!1){l.value=-1,f.value>1&&await h(f.value-1,e&&!a.value?be:void 0)}function he(){return h(1)}function ge(){return h(s.value)}async function h(e,t=0,i=!1){lr.value=!1;let a=f.value!==e,s=t!==n.value,c=er(e)?.meta,l=c?.slide?.frontmatter.clicksStart??0;t=Se(t,l,c?.__clicksContext?.total??999999),(i||a||s)&&await o?.push({path:tr(e,r.value,o.currentRoute.value.name===`export`),query:{...o.currentRoute.value.query,clicks:t===0?void 0:t.toString(),embedded:location.search.includes(`embedded`)?`true`:void 0}})}function _e(){o?.push({path:tr(f.value,!0),query:{...o.currentRoute.value.query}})}function ve(){o?.push({path:tr(f.value,!1),query:{...o.currentRoute.value.query}})}return{slides:$,total:s,currentPath:ee,currentSlideNo:f,currentPage:f,currentSlideRoute:e,currentLayout:te,currentFrontmatter:ne,currentTransition:ce,clicksDirection:l,nextRoute:ie,prevRoute:ae,clicksContext:t,clicks:p,clicksStart:m,clicksTotal:re,hasNext:oe,hasPrev:se,tocTree:ue,navDirection:c,openInEditor:le,next:de,prev:fe,go:h,goLast:ge,goFirst:he,nextSlide:pe,prevSlide:me,enterPresenter:_e,exitPresenter:ve}}var Jr=ue(()=>{let e=pe(),t=le(),n=d(()=>(e?.currentRoute?.value?.query,new URLSearchParams(location.search))),r=d(()=>n.value.has(`print`)||t.name===`export`),i=u(n.value.get(`print`)===`clicks`),a=d(()=>n.value.has(`embedded`)),o=d(()=>t.name===`play`),s=d(()=>t.name===`presenter`),c=d(()=>t.name===`notes`),l=d(()=>!s.value&&(!g.remote||n.value.get(`password`)===g.remote)),ee=d(()=>!!t.params.no),f=d(()=>ee.value?er(t.params.no)?.no??1:1),te=d(()=>$.value[f.value-1]),ne=u(Ke($.value.length,t?.query?.range)),p=Qn(`clicks`,`0`),m=d(()=>ie(te.value)),re=d({get(){let e=+(p.value||0);return Number.isNaN(e)&&(e=0),e},set(e){lr.value=!1,p.value=e.toString()}});function ie(e){if(e?.meta?.__clicksContext)return e.meta.__clicksContext;let t=e.no,n=He(d({get(){return f.value===t?Math.max(+(p.value??0),n.clicksStart):f.value>t?be:n.clicksStart},set(e){f.value===t&&(p.value=e.toString())}}),e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks);return e?.meta&&(e.meta.__clicksContext=n),n}return{router:e,currentRoute:d(()=>t),isPrintMode:r,isPrintWithClicks:i,isEmbedded:a,isPlaying:o,isPresenter:s,isNotesViewer:c,isPresenterAvailable:l,hasPrimarySlide:ee,currentSlideNo:f,currentSlideRoute:te,clicksContext:m,queryClicksRaw:p,queryClicks:re,printRange:ne,getPrimaryClicks:ie}}),Yr=ue(()=>{let e=Jr(),t=pe(),n=qr(e.currentSlideRoute,e.clicksContext,e.queryClicks,e.isPresenter,e.isPrintMode,t);return i([n.total,e.currentRoute],async()=>{let t=e.currentRoute.value.params.no;e.hasPrimarySlide.value&&!er(t)&&(t&&t!==`index.html`?await n.go(n.total.value,0,!0):await n.go(1,0,!0))},{flush:`pre`,immediate:!0}),{...n,...e}});function Xr(){let t=Yr(),n=e()?ce(xe,void 0):void 0;if(!n)return t;let r=ee(n).nav;return{...t,...r}}export{Fe as $,Sr as A,tr as B,pr as C,cr as D,or as E,Ir as F,Ue as G,Ke as H,Fr as I,Ae as J,Be as K,Cr as L,Vr as M,Dr as N,Tr as O,Rr as P,Me as Q,hr as R,dr as S,sr as T,Ge as U,$ as V,He as W,je as X,Ie as Y,Ne as Z,xr as _,Er as a,Pr as b,jr as c,Lr as d,Pe as et,wr as f,br as g,kr as h,mr as i,we as it,Hr as j,ar as k,Ar as l,zr as m,Mr as n,Se as nt,Br as o,lr as p,_ as q,yr as r,De as rt,ur as s,Xr as t,g as tt,vr as u,_r as v,Or as w,Nr as x,gr as y,er as z};