const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-C2rUqOeQ.js","./modules/shiki-CJZsCeMT.js","./rolldown-runtime-hePW80VL.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./slidev/context-DB-9afGB.js","./modules/vue-Dnfgf7Ad.js","./md-CYXxUBJM.css","./md-BPSetbzY.js","./interactive-CBN7ZXLe.js","./DeckFooter-BMnt3Ksi.js","./slidev/client-Z2UPZ46P.js","./syncState-3Tc2ZArb.js","./index-CrXmjRR9.js","./index-UHfzOQ7q.css","./useDrawings-BPLcnjsx.js","./DeckFooter-B6vKMo6W.css","./interactive-D_LX0oud.css","./md-BV7tqBmU.css","./md-AOTeS7la.js","./default-IV3yhGVf.js","./default-DFJXHcku.css","./slidev/VClicks-DYiBHOPb.js","./md-DwWWN7dy.js","./section-CqA-0pFf.js","./section-BZ9Dfv_4.css","./md-Dz8fKB6n.js","./PipelineBoard-eTgFcSR7.js","./WidgetFrame-DHgK6j2H.js","./WidgetFrame-Czwyd28V.css","./PipelineBoard-BYCFBa3n.css","./md-Ds2r8LNq.js","./Citation-CcKhBxpe.js","./Citation-rca7ok54.css","./md-WaS0z-hZ.js","./md-12mDjVUb.js","./TensorLadder-CuthEwW0.js","./useTensorLayout-BsTHvbKs.js","./TensorLadder-B_Wf_8EH.css","./md-CATIlakB.js","./md-BJc_Ngxk.js","./slidev/CodeBlockWrapper-DqFdVwPK.js","./modules/unplugin-icons-CStvVwzQ.js","./md-Cw0ZpuKK.js","./md-DSqY0rZq.js","./md-2xLwDcaF.css","./md-BfELaV__.js","./md-Ssnd4Idi.css","./md-BJK-Icy_.js","./md-DyK7tVH5.js","./md-C20K91iw.css","./md-C6zLxdHH.js","./StepButton-DD4XxENU.js","./StepButton-C1ItLUkw.css","./md-C9B1QIfs.css","./md-CI1ql4wp.js","./md-t5CR7Be2.js","./md-CyDkwqZf.js","./md-Ceq69z99.js","./md-DV4Jznr4.js","./md-BZuzz048.js","./AutogradGraph-D9pug6h-.js","./Slider-C2M0Z0oG.js","./Slider-BO0rW71G.css","./AutogradGraph-BdFB1v9P.css","./slidev/md-BeL1Hnpr.js","./md-UiyZD0jf.js","./md-D1FObvji.js","./md-BhW511Ut.js","./md-BCE3_zZH2.js","./md-DpUFBAFd2.js","./md-CIaX1C6P.js","./useRandom-C9hJeQcV.js","./md-i8-tCe3h.css","./md-Cqra_90r2.js","./md-5DLtPaNo.css","./md-DfVty-xn2.js","./md-q9Ezz7eZ2.js","./md-7Ye1IzaG.js","./md-Cb-WM6X62.js","./md-DLy5QXlk.css","./md-BjlkbSdd2.js","./md-DEacZnAz2.js","./md-Bx7fJlZr2.js","./md-CDHWFGeQ2.js","./md-lZrLjCRG2.js","./md-Be9Z9nVr.js","./ConfusionMatrix-CloAXvtZ.js","./ConfusionMatrix-DR_7rLJw.css","./md-CxLxpOf2.js","./md-DcE0WCje.js","./md-D7KY7dJ8.css","./md-DlxdIU0_.js","./md-gYoRYZQK.js","./md-C246a0Zo.js","./md-BJWJAX7h.js","./md-DE2QGCpb.css"])))=>i.map(i=>d[i]); import{B as e,Ct as t,P as n,R as r,T as i,Z as a,_ as o,at as s,b as c,dt as l,ft as u,g as d,ht as ee,k as f,lt as p,m as te,mt as m,vt as ne,w as re,y as ie,yt as ae,z as oe}from"./modules/shiki-CJZsCeMT.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-Dnfgf7Ad.js";import{l as be,y as xe}from"./slidev/context-DB-9afGB.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:`PyTorch for Deep Learning`,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 03

`,highlighter:`shiki`,twoslash:!0,lineNumbers:!1,colorSchema:`auto`,routerMode:`hash`,aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:``,selectable:!1,themeConfig:{courseCode:`PGR207`,lecture:`03`,lectureTitle:`PyTorch for Deep Learning`},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:`03`,email:`vajira@simula.no`,slidesTitle:`PyTorch for Deep Learning - 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,t=0,n){let i=l(!1),a=new Map,o=new Map,c={get current(){return Se(+e.value,t,c.total)},set current(n){e.value=i.value?Se(n,t,c.total):n},clicksStart:t,get relativeSizeMap(){return a},get maxMap(){return o},get isMounted(){return i.value},setup(){r(()=>{i.value=!0,o=u(o),s(e)||(c.current=e.value)}),oe(()=>{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=c.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(()=>c.current-r),isCurrent:d(()=>c.current===r),isActive:d(()=>c.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=c.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(()=>c.current-i),isCurrent:d(()=>c.current===i),isActive:d(()=>i<=c.current&&c.currentne(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(n,r){return e(),c(`div`,Je,t(`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=i({__name:`SlideLoading`,setup(t){let n=l(!1);return r(()=>{setTimeout(()=>{n.value=!0},200)}),(t,r)=>(e(),c(`div`,Xe,[n.value?(e(),c(te,{key:0},[r[0]||=o(`div`,{class:`i-svg-spinners-90-ring-with-bg text-xl`},null,-1),r[1]||=o(`div`,null,`Loading slide...`,-1)],64)):ie(`v-if`,!0)]))}}),y=p({theme:`dl2026`,addons:[`dl2026`],title:`PyTorch for Deep Learning`,info:`PGR207 Deep Learning 2026 — Lecture 03`,author:`Vajira Thambawita`,routerMode:`hash`,transition:`slide-left`,mdc:!0,themeConfig:{courseCode:`PGR207`,lecture:`03`,lectureTitle:`PyTorch for Deep Learning`},layout:`title`,courseCode:`PGR207`,lecture:`03`,email:`vajira@simula.no`}),Qe=u({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:`-iqi5lv`,frontmatterRaw:`theme: dl2026 addons: - dl2026 title: PyTorch for Deep Learning info: PGR207 Deep Learning 2026 — Lecture 03 author: Vajira Thambawita routerMode: hash transition: slide-left mdc: true themeConfig: courseCode: PGR207 lecture: "03" lectureTitle: PyTorch for Deep Learning layout: title courseCode: PGR207 lecture: "03" email: vajira@simula.no `,note:``,title:`PyTorch for Deep Learning`,index:0,noteHTML:``,images:[],raw:``,frontmatter:y,filepath:``,start:0,sourceIndex:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),b=p({layout:`interactive`,heading:`Where we are`,title:`Where we are`,"aside-width":`15rem`}),$e=u({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:`-uvpe5e`,frontmatterRaw:`layout: interactive heading: Where we are title: Where we are aside-width: 15rem `,note:``,title:`Where we are`,index:1,noteHTML:``,images:[],raw:``,frontmatter:b,filepath:``,start:35,sourceIndex:1,id:1,no:2},__clicksContext:null,__preloaded:!1}),x=p({layout:`default`,title:`What last week cost us`}),et=u({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:`-c5ls2o`,frontmatterRaw:`layout: default title: What last week cost us `,note:``,title:`What last week cost us`,index:2,noteHTML:``,images:[],raw:``,frontmatter:x,filepath:``,start:58,sourceIndex:2,id:2,no:3},__clicksContext:null,__preloaded:!1}),S=p({layout:`section`,index:`00`}),tt=u({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:`ktsk8l`,frontmatterRaw:`layout: section index: "00" `,note:``,title:`Why PyTorch`,level:1,index:3,noteHTML:``,images:[],raw:``,frontmatter:S,filepath:``,start:91,sourceIndex:3,id:3,no:4},__clicksContext:null,__preloaded:!1}),C=p({layout:`interactive`,heading:`Three things, and that is all it is`,title:`Three things, and that is all it is`,"aside-width":`14rem`}),nt=u({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:`6qf636`,frontmatterRaw:`layout: interactive heading: Three things, and that is all it is title: Three things, and that is all it is aside-width: 14rem `,note:``,title:`Three things, and that is all it is`,index:4,noteHTML:``,images:[],raw:``,frontmatter:C,filepath:``,start:98,sourceIndex:4,id:4,no:5},__clicksContext:null,__preloaded:!1}),w=p({layout:`default`,title:`Who uses it, and why that matters to you`}),rt=u({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:`-jnoraq`,frontmatterRaw:`layout: default title: Who uses it, and why that matters to you `,note:``,title:`Who uses it, and why that matters to you`,index:5,noteHTML:``,images:[],raw:``,frontmatter:w,filepath:``,start:125,sourceIndex:5,id:5,no:6},__clicksContext:null,__preloaded:!1}),T=p({layout:`section`,index:`01`}),it=u({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:`no7z5h`,frontmatterRaw:`layout: section index: "01" `,note:``,title:`Tensors`,level:1,index:6,noteHTML:``,images:[],raw:``,frontmatter:T,filepath:``,start:162,sourceIndex:6,id:6,no:7},__clicksContext:null,__preloaded:!1}),E=p({layout:`interactive`,heading:`A tensor is an array with a rank`,title:`A tensor is an array with a rank`,"aside-width":`15rem`}),at=u({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:`aco3st`,frontmatterRaw:`layout: interactive heading: A tensor is an array with a rank title: A tensor is an array with a rank aside-width: 15rem `,note:``,title:`A tensor is an array with a rank`,index:7,noteHTML:``,images:[],raw:``,frontmatter:E,filepath:``,start:169,sourceIndex:7,id:7,no:8},__clicksContext:null,__preloaded:!1}),D=p({layout:`interactive`,heading:`Shape is the whole vocabulary`,title:`Shape is the whole vocabulary`,"aside-width":`16rem`}),ot=u({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:`-2sk5yr`,frontmatterRaw:`layout: interactive heading: Shape is the whole vocabulary title: Shape is the whole vocabulary aside-width: 16rem `,note:``,title:`Shape is the whole vocabulary`,index:8,noteHTML:``,images:[],raw:``,frontmatter:D,filepath:``,start:199,sourceIndex:8,id:8,no:9},__clicksContext:null,__preloaded:!1}),O=p({layout:`default`,title:`Making one`}),st=u({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:`-u5fm04`,frontmatterRaw:`layout: default title: Making one `,note:``,title:`Making one`,index:9,noteHTML:``,images:[],raw:``,frontmatter:O,filepath:``,start:235,sourceIndex:9,id:9,no:10},__clicksContext:null,__preloaded:!1}),k=p({layout:`default`,title:`dtype, and the two that bite`}),ct=u({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:`ae6pgg`,frontmatterRaw:`layout: default title: dtype, and the two that bite `,note:``,title:`dtype, and the two that bite`,index:10,noteHTML:``,images:[],raw:``,frontmatter:k,filepath:``,start:272,sourceIndex:10,id:10,no:11},__clicksContext:null,__preloaded:!1}),A=p({layout:`interactive`,heading:`Indexing and slicing`,title:`Indexing and slicing`,"aside-width":`16rem`}),lt=u({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:`-704ylw`,frontmatterRaw:`layout: interactive heading: Indexing and slicing title: Indexing and slicing aside-width: 16rem `,note:``,title:`Indexing and slicing`,index:11,noteHTML:``,images:[],raw:``,frontmatter:A,filepath:``,start:324,sourceIndex:11,id:11,no:12},__clicksContext:null,__preloaded:!1}),j=p({layout:`interactive`,heading:`Reshape moves nothing`,title:`Reshape moves nothing`,"aside-width":`16rem`}),ut=u({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:`-yu05ao`,frontmatterRaw:`layout: interactive heading: Reshape moves nothing title: Reshape moves nothing aside-width: 16rem `,note:``,title:`Reshape moves nothing`,index:12,noteHTML:``,images:[],raw:``,frontmatter:j,filepath:``,start:359,sourceIndex:12,id:12,no:13},__clicksContext:null,__preloaded:!1}),M=p({layout:`default`,title:`view vs reshape vs flatten`}),dt=u({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:`-g4cf35`,frontmatterRaw:`layout: default title: view vs reshape vs flatten `,note:``,title:`view vs reshape vs flatten`,index:13,noteHTML:``,images:[],raw:``,frontmatter:M,filepath:``,start:395,sourceIndex:13,id:13,no:14},__clicksContext:null,__preloaded:!1}),N=p({layout:`interactive`,heading:`Broadcasting`,title:`Broadcasting`,"aside-width":`16rem`}),ft=u({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:`-n0noig`,frontmatterRaw:`layout: interactive heading: Broadcasting title: Broadcasting aside-width: 16rem `,note:``,title:`Broadcasting`,index:14,noteHTML:``,images:[],raw:``,frontmatter:N,filepath:``,start:445,sourceIndex:14,id:14,no:15},__clicksContext:null,__preloaded:!1}),P=p({layout:`interactive`,heading:`Reductions, and the dim argument`,title:`Reductions, and the dim argument`,"aside-width":`17rem`}),pt=u({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:`df317i`,frontmatterRaw:`layout: interactive heading: Reductions, and the dim argument title: Reductions, and the dim argument aside-width: 17rem `,note:``,title:`Reductions, and the dim argument`,index:15,noteHTML:``,images:[],raw:``,frontmatter:P,filepath:``,start:480,sourceIndex:15,id:15,no:16},__clicksContext:null,__preloaded:!1}),F=p({layout:`default`,title:`Matrix multiply is a linear layer`}),mt=u({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:`xn228m`,frontmatterRaw:`layout: default title: Matrix multiply is a linear layer `,note:``,title:`Matrix multiply is a linear layer`,index:16,noteHTML:``,images:[],raw:``,frontmatter:F,filepath:``,start:518,sourceIndex:16,id:16,no:17},__clicksContext:null,__preloaded:!1}),I=p({layout:`default`,title:`Out of the tensor world`}),ht=u({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:`c4ltcb`,frontmatterRaw:`layout: default title: Out of the tensor world `,note:``,title:`Out of the tensor world`,index:17,noteHTML:``,images:[],raw:``,frontmatter:I,filepath:``,start:557,sourceIndex:17,id:17,no:18},__clicksContext:null,__preloaded:!1}),L=p({layout:`default`,title:`Devices`}),gt=u({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:`xhjupe`,frontmatterRaw:`layout: default title: Devices `,note:``,title:`Devices`,index:18,noteHTML:``,images:[],raw:``,frontmatter:L,filepath:``,start:608,sourceIndex:18,id:18,no:19},__clicksContext:null,__preloaded:!1}),R=p({layout:`default`,title:`Your turn — six shapes`}),_t=u({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:`qhsx68`,frontmatterRaw:`layout: default title: Your turn — six shapes `,note:``,title:`Your turn — six shapes`,index:19,noteHTML:``,images:[],raw:``,frontmatter:R,filepath:``,start:648,sourceIndex:19,id:19,no:20},__clicksContext:null,__preloaded:!1}),vt=p({layout:`section`,index:`02`}),yt=u({get layout(){return vt.layout},get transition(){return vt.transition},get class(){return vt.class},get clicks(){return vt.clicks},get name(){return vt.name},get preload(){return vt.preload},slide:{content:``,revision:`-iu0sxr`,frontmatterRaw:`layout: section index: "02" `,note:``,title:`Autograd`,level:1,index:20,noteHTML:``,images:[],raw:``,frontmatter:vt,filepath:``,start:698,sourceIndex:20,id:20,no:21},__clicksContext:null,__preloaded:!1}),z=p({layout:`interactive`,heading:`The graph PyTorch builds behind your back`,title:`The graph PyTorch builds behind your back`,"aside-width":`16rem`}),bt=u({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:`wnpttq`,frontmatterRaw:`layout: interactive heading: The graph PyTorch builds behind your back title: The graph PyTorch builds behind your back aside-width: 16rem `,note:``,title:`The graph PyTorch builds behind your back`,index:21,noteHTML:``,images:[],raw:``,frontmatter:z,filepath:``,start:705,sourceIndex:21,id:21,no:22},__clicksContext:null,__preloaded:!1}),B=p({layout:`default`,title:`The gradient we derived by hand`}),xt=u({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:`-eumls9`,frontmatterRaw:`layout: default title: The gradient we derived by hand `,note:``,title:`The gradient we derived by hand`,index:22,noteHTML:``,images:[],raw:``,frontmatter:B,filepath:``,start:741,sourceIndex:22,id:22,no:23},__clicksContext:null,__preloaded:!1}),V=p({layout:`default`,title:`Reading the equation: the gradient`}),St=u({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:`l6qhm5`,frontmatterRaw:`layout: default title: "Reading the equation: the gradient" `,note:``,title:`Reading the equation: the gradient`,index:23,noteHTML:``,images:[],raw:``,frontmatter:V,filepath:``,start:788,sourceIndex:23,id:23,no:24},__clicksContext:null,__preloaded:!1}),H=p({layout:`interactive`,heading:`Gradients accumulate`,title:`Gradients accumulate`,"aside-width":`17rem`}),Ct=u({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:`-mxzy2n`,frontmatterRaw:`layout: interactive heading: Gradients accumulate title: Gradients accumulate aside-width: 17rem `,note:``,title:`Gradients accumulate`,index:24,noteHTML:``,images:[],raw:``,frontmatter:H,filepath:``,start:867,sourceIndex:24,id:24,no:25},__clicksContext:null,__preloaded:!1}),U=p({layout:`default`,title:`Three rules for requires_grad`}),wt=u({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:`-hlgl57`,frontmatterRaw:`layout: default title: Three rules for requires_grad `,note:``,title:`Three rules for requires_grad`,index:25,noteHTML:``,images:[],raw:``,frontmatter:U,filepath:``,start:904,sourceIndex:25,id:25,no:26},__clicksContext:null,__preloaded:!1}),W=p({layout:`section`,index:`03`}),Tt=u({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:`-5c3hrm`,frontmatterRaw:`layout: section index: "03" `,note:``,title:`Every PyTorch program is five pieces`,level:1,index:26,noteHTML:``,images:[],raw:``,frontmatter:W,filepath:``,start:954,sourceIndex:26,id:26,no:27},__clicksContext:null,__preloaded:!1}),G=p({layout:`interactive`,heading:`The five pieces`,title:`The five pieces`,"aside-width":`15rem`}),Et=u({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:`o0dezd`,frontmatterRaw:`layout: interactive heading: The five pieces title: The five pieces aside-width: 15rem `,note:``,title:`The five pieces`,index:27,noteHTML:``,images:[],raw:``,frontmatter:G,filepath:``,start:961,sourceIndex:27,id:27,no:28},__clicksContext:null,__preloaded:!1}),K=p({layout:`interactive`,heading:`Dataset and DataLoader`,title:`Dataset and DataLoader`,"aside-width":`16rem`}),Dt=u({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:`-q6vejf`,frontmatterRaw:`layout: interactive heading: Dataset and DataLoader title: Dataset and DataLoader aside-width: 16rem `,note:``,title:`Dataset and DataLoader`,index:28,noteHTML:``,images:[],raw:``,frontmatter:K,filepath:``,start:995,sourceIndex:28,id:28,no:29},__clicksContext:null,__preloaded:!1}),q=p({layout:`figure`,heading:`MNIST, and what one sample is`,title:`MNIST, and what one sample is`}),Ot=u({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:`xzyel5`,frontmatterRaw:`layout: figure heading: MNIST, and what one sample is title: MNIST, and what one sample is `,note:``,title:`MNIST, and what one sample is`,index:29,noteHTML:``,images:[],raw:``,frontmatter:q,filepath:``,start:1030,sourceIndex:29,id:29,no:30},__clicksContext:null,__preloaded:!1}),J=p({layout:`default`,title:`transforms — ToTensor and Normalize`}),kt=u({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:`yytonv`,frontmatterRaw:`layout: default title: transforms — ToTensor and Normalize `,note:``,title:`transforms — ToTensor and Normalize`,index:30,noteHTML:``,images:[],raw:``,frontmatter:J,filepath:``,start:1055,sourceIndex:30,id:30,no:31},__clicksContext:null,__preloaded:!1}),At=p({layout:`default`,title:`Three splits, one rule`}),jt=u({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:`cbw1ty`,frontmatterRaw:`layout: default title: Three splits, one rule `,note:``,title:`Three splits, one rule`,index:31,noteHTML:``,images:[],raw:``,frontmatter:At,filepath:``,start:1093,sourceIndex:31,id:31,no:32},__clicksContext:null,__preloaded:!1}),Mt=p({layout:`default`,title:`An nn.Module has exactly two parts`}),Nt=u({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:`-fig3iw`,frontmatterRaw:`layout: default title: An nn.Module has exactly two parts `,note:``,title:`An nn.Module has exactly two parts`,index:32,noteHTML:``,images:[],raw:``,frontmatter:Mt,filepath:``,start:1144,sourceIndex:32,id:32,no:33},__clicksContext:null,__preloaded:!1}),Pt=p({layout:`interactive`,heading:`The network, priced`,title:`The network, priced`,"aside-width":`15rem`}),Ft=u({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:`-lvw50l`,frontmatterRaw:`layout: interactive heading: The network, priced title: The network, priced aside-width: 15rem `,note:``,title:`The network, priced`,index:33,noteHTML:``,images:[],raw:``,frontmatter:Pt,filepath:``,start:1184,sourceIndex:33,id:33,no:34},__clicksContext:null,__preloaded:!1}),It=p({layout:`default`,title:`Why flatten, and why no softmax`}),Lt=u({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:`-h2dvbn`,frontmatterRaw:`layout: default title: Why flatten, and why no softmax `,note:``,title:`Why flatten, and why no softmax`,index:34,noteHTML:``,images:[],raw:``,frontmatter:It,filepath:``,start:1219,sourceIndex:34,id:34,no:35},__clicksContext:null,__preloaded:!1}),Rt=p({layout:`default`,title:`Loss and optimiser`}),zt=u({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:`-1ia9t2`,frontmatterRaw:`layout: default title: Loss and optimiser `,note:``,title:`Loss and optimiser`,index:35,noteHTML:``,images:[],raw:``,frontmatter:Rt,filepath:``,start:1267,sourceIndex:35,id:35,no:36},__clicksContext:null,__preloaded:!1}),Bt=p({layout:`default`,title:`The training loop`}),Vt=u({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:`aqbolc`,frontmatterRaw:`layout: default title: The training loop `,note:``,title:`The training loop`,index:36,noteHTML:``,images:[],raw:``,frontmatter:Bt,filepath:``,start:1315,sourceIndex:36,id:36,no:37},__clicksContext:null,__preloaded:!1}),Y=p({layout:`section`,index:`04`}),Ht=u({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:`-509tt0`,frontmatterRaw:`layout: section index: "04" `,note:``,title:`Did it work?`,level:1,index:37,noteHTML:``,images:[],raw:``,frontmatter:Y,filepath:``,start:1355,sourceIndex:37,id:37,no:38},__clicksContext:null,__preloaded:!1}),Ut=p({layout:`default`,title:`train, eval and no_grad`}),Wt=u({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:`klfqes`,frontmatterRaw:`layout: default title: train, eval and no_grad `,note:``,title:`train, eval and no_grad`,index:38,noteHTML:``,images:[],raw:``,frontmatter:Ut,filepath:``,start:1362,sourceIndex:38,id:38,no:39},__clicksContext:null,__preloaded:!1}),Gt=p({layout:`interactive`,heading:`Accuracy is one number over 10 000 images`,title:`Accuracy is one number over 10 000 images`,"aside-width":`17rem`}),Kt=u({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:`agyo41`,frontmatterRaw:`layout: interactive heading: Accuracy is one number over 10 000 images title: Accuracy is one number over 10 000 images aside-width: 17rem `,note:``,title:`Accuracy is one number over 10 000 images`,index:39,noteHTML:``,images:[],raw:``,frontmatter:Gt,filepath:``,start:1400,sourceIndex:39,id:39,no:40},__clicksContext:null,__preloaded:!1}),qt=p({layout:`interactive`,heading:`Precision, recall, F1 — per class`,title:`Precision, recall, F1 — per class`,"aside-width":`17rem`}),Jt=u({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:`-jc1qav`,frontmatterRaw:`layout: interactive heading: Precision, recall, F1 — per class title: Precision, recall, F1 — per class aside-width: 17rem `,note:``,title:`Precision, recall, F1 — per class`,index:40,noteHTML:``,images:[],raw:``,frontmatter:qt,filepath:``,start:1435,sourceIndex:40,id:40,no:41},__clicksContext:null,__preloaded:!1}),Yt=p({layout:`interactive`,heading:`Learning curves`,title:`Learning curves`,"aside-width":`17rem`}),Xt=u({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:`-819ln4`,frontmatterRaw:`layout: interactive heading: Learning curves title: Learning curves aside-width: 17rem `,note:``,title:`Learning curves`,index:41,noteHTML:``,images:[],raw:``,frontmatter:Yt,filepath:``,start:1475,sourceIndex:41,id:41,no:42},__clicksContext:null,__preloaded:!1}),Zt=p({layout:`default`,title:`Five bugs, and the symptom of each`}),Qt=u({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:`7zww54`,frontmatterRaw:`layout: default title: Five bugs, and the symptom of each `,note:``,title:`Five bugs, and the symptom of each`,index:42,noteHTML:``,images:[],raw:``,frontmatter:Zt,filepath:``,start:1513,sourceIndex:42,id:42,no:43},__clicksContext:null,__preloaded:!1}),$t=p({layout:`default`,title:`The exercise`}),en=u({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:`ct6ake`,frontmatterRaw:`layout: default title: The exercise `,note:``,title:`The exercise`,index:43,noteHTML:``,images:[],raw:``,frontmatter:$t,filepath:``,start:1548,sourceIndex:43,id:43,no:44},__clicksContext:null,__preloaded:!1}),tn=p({layout:`default`,title:`Where we got to`}),nn=u({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:`-17vxko`,frontmatterRaw:`layout: default title: Where we got to `,note:``,title:`Where we got to`,index:44,noteHTML:``,images:[],raw:``,frontmatter:tn,filepath:``,start:1601,sourceIndex:44,id:44,no:45},__clicksContext:null,__preloaded:!1}),X=p({layout:`end`,email:`vajira@simula.no`,next:`Deep Convolutional Neural Networks`}),rn=u({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:`cleon2`,frontmatterRaw:`layout: end email: vajira@simula.no next: Deep Convolutional Neural Networks `,note:``,title:`To be continued…`,level:1,index:45,noteHTML:``,images:[],raw:``,frontmatter:X,filepath:``,start:1648,sourceIndex:45,id:45,no:46},__clicksContext:null,__preloaded:!1}),Z=Array(46),Q=(e,t)=>re({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-C2rUqOeQ.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-BPSetbzY.js`),__vite__mapDeps([8,1,2,3,4,5,6,9,10,11,12,13,14,15,16,17,18]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},sn=async()=>{try{return Z[2]??=await _(()=>import(`./md-AOTeS7la.js`),__vite__mapDeps([19,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},cn=async()=>{try{return Z[3]??=await _(()=>import(`./md-DwWWN7dy.js`),__vite__mapDeps([23,1,2,3,5,6,24,4,25]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ln=async()=>{try{return Z[4]??=await _(()=>import(`./md-Dz8fKB6n.js`),__vite__mapDeps([26,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,27,28,29,30]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},un=async()=>{try{return Z[5]??=await _(()=>import(`./md-Ds2r8LNq.js`),__vite__mapDeps([31,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22,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-WaS0z-hZ.js`),__vite__mapDeps([34,1,2,3,5,6,24,4,25]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},fn=async()=>{try{return Z[7]??=await _(()=>import(`./md-12mDjVUb.js`),__vite__mapDeps([35,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,36,28,29,37,38]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},pn=async()=>{try{return Z[8]??=await _(()=>import(`./md-CATIlakB.js`),__vite__mapDeps([39,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,36,28,29,37,38]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},mn=async()=>{try{return Z[9]??=await _(()=>import(`./md-BJc_Ngxk.js`),__vite__mapDeps([40,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},hn=async()=>{try{return Z[10]??=await _(()=>import(`./md-Cw0ZpuKK.js`),__vite__mapDeps([43,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},gn=async()=>{try{return Z[11]??=await _(()=>import(`./md-DSqY0rZq.js`),__vite__mapDeps([44,1,2,3,4,5,6,28,29,37,9,10,11,12,13,14,15,16,17,45]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},_n=async()=>{try{return Z[12]??=await _(()=>import(`./md-BfELaV__.js`),__vite__mapDeps([46,1,2,3,4,5,6,28,29,37,9,10,11,12,13,14,15,16,17,47]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},vn=async()=>{try{return Z[13]??=await _(()=>import(`./md-BJK-Icy_.js`),__vite__mapDeps([48,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},yn=async()=>{try{return Z[14]??=await _(()=>import(`./md-DyK7tVH5.js`),__vite__mapDeps([49,1,2,3,4,5,6,28,29,37,9,10,11,12,13,14,15,16,17,50]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},bn=async()=>{try{return Z[15]??=await _(()=>import(`./md-C6zLxdHH.js`),__vite__mapDeps([51,1,2,3,4,5,6,28,29,9,10,11,12,13,14,15,16,17,52,53,54]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xn=async()=>{try{return Z[16]??=await _(()=>import(`./md-CI1ql4wp.js`),__vite__mapDeps([55,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Sn=async()=>{try{return Z[17]??=await _(()=>import(`./md-t5CR7Be2.js`),__vite__mapDeps([56,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Cn=async()=>{try{return Z[18]??=await _(()=>import(`./md-CyDkwqZf.js`),__vite__mapDeps([57,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wn=async()=>{try{return Z[19]??=await _(()=>import(`./md-Ceq69z99.js`),__vite__mapDeps([58,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Tn=async()=>{try{return Z[20]??=await _(()=>import(`./md-DV4Jznr4.js`),__vite__mapDeps([59,1,2,3,5,6,24,4,25]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},En=async()=>{try{return Z[21]??=await _(()=>import(`./md-BZuzz048.js`),__vite__mapDeps([60,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,61,28,29,52,53,62,63,64]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Dn=async()=>{try{return Z[22]??=await _(()=>import(`./slidev/md-BeL1Hnpr.js`),__vite__mapDeps([65,1,2,3,5,6,13,12,14,41,42,20,4,10,11,15,16,21]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},On=async()=>{try{return Z[23]??=await _(()=>import(`./md-UiyZD0jf.js`),__vite__mapDeps([66,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},kn=async()=>{try{return Z[24]??=await _(()=>import(`./md-D1FObvji.js`),__vite__mapDeps([67,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,61,28,29,52,53,62,63,64]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},An=async()=>{try{return Z[25]??=await _(()=>import(`./md-BhW511Ut.js`),__vite__mapDeps([68,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},jn=async()=>{try{return Z[26]??=await _(()=>import(`./md-BCE3_zZH2.js`),__vite__mapDeps([69,1,2,3,5,6,24,4,25]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Mn=async()=>{try{return Z[27]??=await _(()=>import(`./md-DpUFBAFd2.js`),__vite__mapDeps([70,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,27,28,29,30]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Nn=async()=>{try{return Z[28]??=await _(()=>import(`./md-CIaX1C6P.js`),__vite__mapDeps([71,1,2,3,4,5,6,28,29,9,10,11,12,13,14,15,16,17,52,53,62,63,72,73]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pn=async()=>{try{return Z[29]??=await _(()=>import(`./md-Cqra_90r2.js`),__vite__mapDeps([74,1,2,3,4,5,6,10,11,12,13,14,15,16,32,33,75]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fn=async()=>{try{return Z[30]??=await _(()=>import(`./md-DfVty-xn2.js`),__vite__mapDeps([76,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},In=async()=>{try{return Z[31]??=await _(()=>import(`./md-q9Ezz7eZ2.js`),__vite__mapDeps([77,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ln=async()=>{try{return Z[32]??=await _(()=>import(`./md-7Ye1IzaG.js`),__vite__mapDeps([78,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Rn=async()=>{try{return Z[33]??=await _(()=>import(`./md-Cb-WM6X62.js`),__vite__mapDeps([79,1,2,3,4,5,6,28,29,9,10,11,12,13,14,15,16,17,62,63,80]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},zn=async()=>{try{return Z[34]??=await _(()=>import(`./md-BjlkbSdd2.js`),__vite__mapDeps([81,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Bn=async()=>{try{return Z[35]??=await _(()=>import(`./md-DEacZnAz2.js`),__vite__mapDeps([82,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Vn=async()=>{try{return Z[36]??=await _(()=>import(`./md-Bx7fJlZr2.js`),__vite__mapDeps([83,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Hn=async()=>{try{return Z[37]??=await _(()=>import(`./md-CDHWFGeQ2.js`),__vite__mapDeps([84,1,2,3,5,6,24,4,25]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Un=async()=>{try{return Z[38]??=await _(()=>import(`./md-lZrLjCRG2.js`),__vite__mapDeps([85,1,2,3,5,6,41,13,12,14,42,20,4,10,11,15,16,21]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Wn=async()=>{try{return Z[39]??=await _(()=>import(`./md-Be9Z9nVr.js`),__vite__mapDeps([86,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,87,28,29,52,53,88]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Gn=async()=>{try{return Z[40]??=await _(()=>import(`./md-CxLxpOf2.js`),__vite__mapDeps([89,1,2,3,5,6,9,4,10,11,12,13,14,15,16,17,87,28,29,52,53,88]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Kn=async()=>{try{return Z[41]??=await _(()=>import(`./md-DcE0WCje.js`),__vite__mapDeps([90,1,2,3,4,5,6,28,29,9,10,11,12,13,14,15,16,17,52,53,62,63,72,91]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},qn=async()=>{try{return Z[42]??=await _(()=>import(`./md-DlxdIU0_.js`),__vite__mapDeps([92,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Jn=async()=>{try{return Z[43]??=await _(()=>import(`./md-gYoRYZQK.js`),__vite__mapDeps([93,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Yn=async()=>{try{return Z[44]??=await _(()=>import(`./md-C246a0Zo.js`),__vite__mapDeps([94,1,2,3,5,6,20,4,10,11,12,13,14,15,16,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Xn=async()=>{try{return Z[45]??=await _(()=>import(`./md-BJWJAX7h.js`),__vite__mapDeps([95,1,2,3,4,5,6,96]),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:_t,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)}],$=m(Zn);function Qn(e,t,{mode:r=`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){n(()=>{(i.currentRoute.value.query[e]??t?.toString())!==a.toString()&&i[ae(r)]({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=l(!1),or=l(!1),sr=l(!1),cr=l(!1),lr=l(!1),ur=l(!1),dr=l(!0),fr=p(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=m(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=l(0),r,i,o){let s=d(()=>$.value.length),c=l(0),u=l(0),ee=d(()=>tr(e.value,r.value)),f=d(()=>e.value.no),p=d(()=>e.value.meta?.layout||(f.value===1?`cover`:`default`)),te=d(()=>e.value.meta.slide.frontmatter),m=d(()=>t.value.current),ne=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||m.valuef.value>1||m.value>0),ce=d(()=>i.value?void 0:ir(c.value,e.value,ae.value));a(e,(e,t)=>{c.value=e.no-t.no});async function le(e){return!1}let ue=Kr($,f,e);async function de(){u.value=1,re.value<=n.value?await pe():n.value+=1}async function fe(){u.value=-1,n.value<=ne.value?await me(!0):--n.value}async function pe(e=!1){u.value=1,f.value<$.value.length&&await h(f.value+1,e&&!i.value?be:void 0)}async function me(e=!1){u.value=-1,f.value>1&&await h(f.value-1,e&&!i.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:p,currentFrontmatter:te,currentTransition:ce,clicksDirection:u,nextRoute:ie,prevRoute:ae,clicksContext:t,clicks:m,clicksStart:ne,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=l(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`),u=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),p=d(()=>$.value[f.value-1]),te=l(Ke($.value.length,t?.query?.range)),m=Qn(`clicks`,`0`),ne=d(()=>ie(p.value)),re=d({get(){let e=+(m.value||0);return Number.isNaN(e)&&(e=0),e},set(e){lr.value=!1,m.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(+(m.value??0),n.clicksStart):f.value>t?be:n.clicksStart},set(e){f.value===t&&(m.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:u,hasPrimarySlide:ee,currentSlideNo:f,currentSlideRoute:p,clicksContext:ne,queryClicksRaw:m,queryClicks:re,printRange:te,getPrimaryClicks:ie}}),Yr=ue(()=>{let e=Jr(),t=pe(),n=qr(e.currentSlideRoute,e.clicksContext,e.queryClicks,e.isPresenter,e.isPrintMode,t);return a([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 e=Yr(),t=f()?ce(xe,void 0):void 0;if(!t)return e;let n=ee(t).nav;return{...e,...n}}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};