From 03c576133697c240546c150002684c1f25fb611c Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sat, 3 Aug 2024 17:45:20 -0400 Subject: [PATCH 1/6] Debug version but builds PDF book well mostly - Enabled margin references - Inherited edward tufte style (though not using that class) - Added margin fixes to avoid margin notes getting cutoff - Fixed the PDF width and height so it resembles hennesey and patterson --- _quarto.yml | 246 +++++++++++++++++++++++++++++----------------------- 1 file changed, 137 insertions(+), 109 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 39b16bb6e..c1487cf8f 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -49,7 +49,7 @@ book: page-navigation: true title: "Machine Learning Systems" - subtitle: "with tinyML" +# subtitle: "with tinyML" abstract: "{{< var title.long >}} offers readers an entry point to understand machine learning (ML) systems by grounding concepts in applied ML. As the demand for efficient and scalable ML solutions grows, the ability to construct robust ML pipelines becomes increasingly crucial. This book aims to demystify the process of developing complete ML systems suitable for deployment, spanning key phases like data collection, model design, optimization, acceleration, security hardening, and integration, all from a systems perspective. The text covers a wide range of concepts relevant to general ML engineering across industries and applications, using TinyML as a pedagogical tool due to its global accessibility. Readers will learn basic principles around designing ML model architectures, hardware-aware training strategies, performant inference optimization, and benchmarking methodologies. The book also explores crucial systems considerations in areas like reliability, privacy, responsible AI, and solution validation. Enjoy reading it!" repo-url: https://github.com/harvard-edge/cs249r_book @@ -81,62 +81,62 @@ book: - contents/introduction/introduction.qmd - contents/ml_systems/ml_systems.qmd - contents/dl_primer/dl_primer.qmd - - part: Workflow - chapters: - - contents/workflow/workflow.qmd - - contents/data_engineering/data_engineering.qmd - - contents/frameworks/frameworks.qmd - - part: Training - chapters: - - contents/training/training.qmd - - contents/efficient_ai/efficient_ai.qmd - - contents/optimizations/optimizations.qmd - - contents/hw_acceleration/hw_acceleration.qmd - - part: Deployment - chapters: - - contents/benchmarking/benchmarking.qmd - - contents/ondevice_learning/ondevice_learning.qmd - - contents/ops/ops.qmd - - part: Advanced Topics - chapters: - - contents/privacy_security/privacy_security.qmd - - contents/responsible_ai/responsible_ai.qmd - - contents/sustainable_ai/sustainable_ai.qmd - - contents/robust_ai/robust_ai.qmd - - contents/generative_ai/generative_ai.qmd - - part: Social Impact - chapters: - - contents/ai_for_good/ai_for_good.qmd - - part: Closing - chapters: - - contents/conclusion/conclusion.qmd - - text: "---" - # LABS - - part: LABS - # getting started - chapters: - - contents/labs/labs.qmd - - contents/labs/getting_started.qmd - # nicla vision - - part: contents/labs/arduino/nicla_vision/nicla_vision.qmd - chapters: - - contents/labs/arduino/nicla_vision/setup/setup.qmd - - contents/labs/arduino/nicla_vision/image_classification/image_classification.qmd - - contents/labs/arduino/nicla_vision/object_detection/object_detection.qmd - - contents/labs/arduino/nicla_vision/kws/kws.qmd - - contents/labs/arduino/nicla_vision/motion_classification/motion_classification.qmd - # xiao sense - - part: contents/labs/seeed/xiao_esp32s3/xiao_esp32s3.qmd - chapters: - - contents/labs/seeed/xiao_esp32s3/setup/setup.qmd - - contents/labs/seeed/xiao_esp32s3/image_classification/image_classification.qmd - - contents/labs/seeed/xiao_esp32s3/object_detection/object_detection.qmd - - contents/labs/seeed/xiao_esp32s3/kws/kws.qmd - - contents/labs/seeed/xiao_esp32s3/motion_classification/motion_classification.qmd - - part: contents/labs/shared/shared.qmd - chapters: - - contents/labs/shared/kws_feature_eng/kws_feature_eng.qmd - - contents/labs/shared/dsp_spectral_features_block/dsp_spectral_features_block.qmd + # - part: Workflow + # chapters: + # - contents/workflow/workflow.qmd + # - contents/data_engineering/data_engineering.qmd + # - contents/frameworks/frameworks.qmd + # - part: Training + # chapters: + # - contents/training/training.qmd + # - contents/efficient_ai/efficient_ai.qmd + # - contents/optimizations/optimizations.qmd + # - contents/hw_acceleration/hw_acceleration.qmd + # - part: Deployment + # chapters: + # - contents/benchmarking/benchmarking.qmd + # - contents/ondevice_learning/ondevice_learning.qmd + # - contents/ops/ops.qmd + # - part: Advanced Topics + # chapters: + # - contents/privacy_security/privacy_security.qmd + # - contents/responsible_ai/responsible_ai.qmd + # - contents/sustainable_ai/sustainable_ai.qmd + # - contents/robust_ai/robust_ai.qmd + # - contents/generative_ai/generative_ai.qmd + # - part: Social Impact + # chapters: + # - contents/ai_for_good/ai_for_good.qmd + # - part: Closing + # chapters: + # - contents/conclusion/conclusion.qmd + # - text: "---" + # # LABS + # - part: LABS + # # getting started + # chapters: + # - contents/labs/labs.qmd + # - contents/labs/getting_started.qmd + # # nicla vision + # - part: contents/labs/arduino/nicla_vision/nicla_vision.qmd + # chapters: + # - contents/labs/arduino/nicla_vision/setup/setup.qmd + # - contents/labs/arduino/nicla_vision/image_classification/image_classification.qmd + # - contents/labs/arduino/nicla_vision/object_detection/object_detection.qmd + # - contents/labs/arduino/nicla_vision/kws/kws.qmd + # - contents/labs/arduino/nicla_vision/motion_classification/motion_classification.qmd + # # xiao sense + # - part: contents/labs/seeed/xiao_esp32s3/xiao_esp32s3.qmd + # chapters: + # - contents/labs/seeed/xiao_esp32s3/setup/setup.qmd + # - contents/labs/seeed/xiao_esp32s3/image_classification/image_classification.qmd + # - contents/labs/seeed/xiao_esp32s3/object_detection/object_detection.qmd + # - contents/labs/seeed/xiao_esp32s3/kws/kws.qmd + # - contents/labs/seeed/xiao_esp32s3/motion_classification/motion_classification.qmd + # - part: contents/labs/shared/shared.qmd + # chapters: + # - contents/labs/shared/kws_feature_eng/kws_feature_eng.qmd + # - contents/labs/shared/dsp_spectral_features_block/dsp_spectral_features_block.qmd - text: "---" # REFERENCES - part: REFERENCES @@ -155,8 +155,8 @@ citation: true license: CC-BY-NC-SA -filters: - - custom_callout.lua +#filters: + #- custom_callout.lua bibliography: # main @@ -185,10 +185,34 @@ comments: giscus: repo: harvard-edge/cs249r_book +crossref: + appendix-title: "Appendix" + appendix-delim: ":" + + custom: + - kind: float + reference-prefix: Lab + key: labq + latex-env: lab + + - kind: float + reference-prefix: Exercise + key: exr + latex-env: exr + + - kind: float + reference-prefix: Video + key: vid + latex-env: vid + +editor: + render-on-save: true + format: html: reference-location: margin citation-location: margin + sidenote: true # Enable sidenotes for Tufte style theme: light: @@ -199,7 +223,7 @@ format: - darkly - style.scss - style-dark.scss - mainfont: Nunito + mainfont: "ETBembo" # Tufte-inspired font fontsize: 1rem linkcolor: "#A51C30" urlcolor: "#A51C30" @@ -215,7 +239,7 @@ format: fig-height: 6 number-depth: 3 toc: true - toc-depth: 4 + toc-depth: 4 include-in-header: text: | @@ -228,16 +252,27 @@ format: citeproc: true pdf: + reference-location: margin + citation-location: margin + title-block-style: none + indent: 0px + sansfont: "TeX Gyre Heros" + sansfontoptions: "Scale=MatchUppercase" documentclass: scrbook - classoption: [abstract] + classoption: [abstract,openright] keep-tex: true toc: true # Table of Contents toc-depth: 3 # Depth of headings to include in TOC number-sections: true latex-engine: xelatex # or pdflatex, lualatex, etc. - geometry: margin=1in fontsize: 10pt - papersize: letter # or a4, etc. + papersize: "7.5in x 9.25in" # Set to specific textbook size + geometry: + - top=1in + - bottom=1in + - inner=1in + - outer=2.25in + - marginparwidth=1.5in fig_caption: true link-citations: true citation_package: natbib # or biblatex @@ -246,6 +281,16 @@ format: include-in-header: text: | + \usepackage{geometry} + \geometry{ + paperwidth=7.5in, + paperheight=9.25in, + top=1in, + bottom=1in, + inner=1in, + outer=2.25in, + marginparwidth=1.5in, + } \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{mathptmx} @@ -253,42 +298,49 @@ format: \usepackage{underscore} \usepackage[english]{babel} \usepackage{etoolbox} - \usepackage{fontspec} \usepackage{newpxtext} % Palatino-like font - \usepackage{hyperref} % For hyperlinks + \usepackage{hyperref} \usepackage{xcolor} - \usepackage[format=plain, - labelfont={bf,it}, - textfont=it, labelsep=space]{caption} - + \usepackage[format=plain, labelfont={bf,it}, textfont=it, labelsep=space]{caption} \definecolor{crimson}{RGB}{165, 28, 48} - \hypersetup{ - colorlinks=true, % Enable colored links - linkcolor=crimson, % Color of internal links - citecolor=crimson, % Color of citations - urlcolor=crimson % Color of URLs + colorlinks=true, + linkcolor=crimson, + citecolor=crimson, + urlcolor=crimson } + \usepackage{marginfix} % Fixes the issue of margin notes being cut off + \usepackage{minitoc} + + % Initialize minitocs + \dominitoc + % Add minitoc to each chapter automatically + \usepackage{etoolbox} + \preto\chapter{\minitoc} + \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} - %\newfontfamily\tocfont{Times New Roman} + % Disable the default title page + \renewcommand{\maketitle}{} \let\endtitlepage\relax \AtBeginDocument{ + \newgeometry{top=1in,bottom=1in,inner=1in,outer=1in} % Geometry for title page \begin{titlepage} \centering \vspace{-3em} \includegraphics[width=\textwidth]{cover-image-white.png} % Adjust the size and path to your image - {{\Huge\bfseries Machine Learning Systems}\\[1em] \Large with TinyML\par} + {{\Huge\bfseries Machine Learning Systems}\\[1em] \par} \vspace*{\fill} {\large Written, edited and curated by \\[.2cm] Prof. Vijay Janapa Reddi \\[.2cm] Harvard University \\[1em] \normalsize {\itshape With special thanks to the community for their contributions and support.} \\[1em] \pagebreak \vfill \scriptsize Last Modified: \today\par \vfill} \vspace*{\fill} \end{titlepage} + \restoregeometry % Restore original geometry %\addtocontents{toc}{\tocfont} } @@ -296,24 +348,23 @@ format: \let\endtitlepage\relax \pagestyle{fancy} - \fancyhf{} % Clear all header and footer fields - \fancyhead[LE,RO]{\thepage} % Page number on the left on even pages, right on odd pages - \fancyhead[RE,LO]{\nouppercase{\leftmark}} % Chapter name on both sides + \fancyhf{} + \fancyhead[LE]{\color{crimson}\nouppercase{\rightmark}} + \fancyhead[RO]{\color{crimson}\thepage} + \fancyhead[LO]{\color{crimson}\MakeUppercase{\textbf{\leftmark}}} + \fancyhead[RE]{\color{crimson}\thepage} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0pt} - \fancypagestyle{plain}{% - \fancyhf{} % clear all header and footer fields - \fancyhead[LE,RO]{\thepage} % Page number + \fancyhf{} + \fancyhead[LE,RO]{\color{crimson}\thepage} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0pt} } - \addtokomafont{disposition}{\rmfamily\color{crimson}} \addtokomafont{chapter}{\color{crimson}} \addtokomafont{section}{\color{crimson}} - - % Define the abstract environment + \addtokomafont{subsection}{\color{crimson}} \newenvironment{abstract}{% \chapter*{\abstractname}% \addcontentsline{toc}{chapter}{\abstractname}% @@ -321,26 +372,3 @@ format: }{% \clearpage } - -crossref: - appendix-title: "Appendix" - appendix-delim: ":" - - custom: - - kind: float - reference-prefix: Lab - key: labq - latex-env: lab - - - kind: float - reference-prefix: Exercise - key: exr - latex-env: exr - - - kind: float - reference-prefix: Video - key: vid - latex-env: vid - -editor: - render-on-save: true From 923795909e4b63fa983684e91b67a4b61a33b22d Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sat, 3 Aug 2024 18:08:50 -0400 Subject: [PATCH 2/6] Remove minitoc + add openleft --- _quarto.yml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index c1487cf8f..33505154c 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -259,7 +259,7 @@ format: sansfont: "TeX Gyre Heros" sansfontoptions: "Scale=MatchUppercase" documentclass: scrbook - classoption: [abstract,openright] + classoption: [abstract,openleft] keep-tex: true toc: true # Table of Contents toc-depth: 3 # Depth of headings to include in TOC @@ -310,15 +310,8 @@ format: urlcolor=crimson } \usepackage{marginfix} % Fixes the issue of margin notes being cut off - \usepackage{minitoc} - - % Initialize minitocs - \dominitoc - - % Add minitoc to each chapter automatically - \usepackage{etoolbox} - \preto\chapter{\minitoc} - + \usepackage{marginnote} + \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} % Disable the default title page @@ -372,3 +365,15 @@ format: }{% \clearpage } + % Add index and glossary packages + \usepackage{imakeidx} + \usepackage[acronym]{glossaries} + \makeindex + \makeglossaries + + include-after-body: + text: | + \clearpage + \printglossary[type=main, title=Glossary, toctitle=Glossary] + \clearpage + \printindex From 3ab7e641d78c9c6d436e44a7236c998153c98920 Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sun, 4 Aug 2024 11:56:14 -0400 Subject: [PATCH 3/6] This is a working version for the PDF build with margin + citations - Citations appear at the end, which I think is good for the book. - In the HTML they appear on the side, which I feel is good for the website. --- _quarto.yml | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 33505154c..e18f2b122 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -69,18 +69,18 @@ book: - part: FRONT MATTER chapters: - index.qmd - - contents/dedication.qmd - - contents/acknowledgements/acknowledgements.qmd - - contents/contributors.qmd - - contents/copyright.qmd - - contents/about.qmd + # - contents/dedication.qmd + # - contents/acknowledgements/acknowledgements.qmd + # - contents/contributors.qmd + # - contents/copyright.qmd + # - contents/about.qmd - text: "---" - part: MAIN - part: Fundamentals chapters: - - contents/introduction/introduction.qmd +# - contents/introduction/introduction.qmd - contents/ml_systems/ml_systems.qmd - - contents/dl_primer/dl_primer.qmd + # - contents/dl_primer/dl_primer.qmd # - part: Workflow # chapters: # - contents/workflow/workflow.qmd @@ -155,8 +155,8 @@ citation: true license: CC-BY-NC-SA -#filters: - #- custom_callout.lua +filters: + - custom_callout.lua bibliography: # main @@ -250,16 +250,16 @@ format: citeproc: true - + pdf: reference-location: margin - citation-location: margin + citation-location: block title-block-style: none indent: 0px sansfont: "TeX Gyre Heros" sansfontoptions: "Scale=MatchUppercase" documentclass: scrbook - classoption: [abstract,openleft] + classoption: [abstract,openleft,sfsidenotes] keep-tex: true toc: true # Table of Contents toc-depth: 3 # Depth of headings to include in TOC @@ -276,8 +276,8 @@ format: fig_caption: true link-citations: true citation_package: natbib # or biblatex - fig-cap-location: bottom - tbl-cap-location: top + fig-cap-location: margin + tbl-cap-location: margin include-in-header: text: | @@ -304,7 +304,6 @@ format: \usepackage[format=plain, labelfont={bf,it}, textfont=it, labelsep=space]{caption} \definecolor{crimson}{RGB}{165, 28, 48} \hypersetup{ - colorlinks=true, linkcolor=crimson, citecolor=crimson, urlcolor=crimson @@ -344,7 +343,7 @@ format: \fancyhf{} \fancyhead[LE]{\color{crimson}\nouppercase{\rightmark}} \fancyhead[RO]{\color{crimson}\thepage} - \fancyhead[LO]{\color{crimson}\MakeUppercase{\textbf{\leftmark}}} + \fancyhead[LO]{\color{crimson}\MakeUppercase{\leftmark}} \fancyhead[RE]{\color{crimson}\thepage} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0pt} From bac56bc4607ce2ed99ec2294c163b8e48a9adc19 Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sun, 4 Aug 2024 16:28:57 -0400 Subject: [PATCH 4/6] Clean-up plus adding in packages for indexes Not a clean check in :( --- _quarto.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index e18f2b122..9b828ea28 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -278,6 +278,10 @@ format: citation_package: natbib # or biblatex fig-cap-location: margin tbl-cap-location: margin + hyperrefoptions: + - linktoc=all + - pdfwindowui + - pdfpagemode=FullScreen include-in-header: text: | @@ -291,6 +295,8 @@ format: outer=2.25in, marginparwidth=1.5in, } + \usepackage{imakeidx} + \usepackage[acronym]{glossaries} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{mathptmx} @@ -310,6 +316,7 @@ format: } \usepackage{marginfix} % Fixes the issue of margin notes being cut off \usepackage{marginnote} + \reversemarginpar \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} @@ -364,9 +371,7 @@ format: }{% \clearpage } - % Add index and glossary packages - \usepackage{imakeidx} - \usepackage[acronym]{glossaries} + \makeindex \makeglossaries From 04409a61b82da135636613eb74bc0f3e482beae9 Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sun, 4 Aug 2024 17:36:59 -0400 Subject: [PATCH 5/6] HTML + PDF build for edward tufte The HTML and PDF build both work fine. Figure captions etc. can now appear in margins for PDFs as well as HTML This works even with the @citation which was a real pain --- _quarto.yml | 141 +++++++++--------- contents/ai_for_good/ai_for_good.qmd | 3 + .../data_engineering/data_engineering.qmd | 3 + contents/frameworks/frameworks.qmd | 3 + contents/introduction/introduction.qmd | 2 +- contents/ml_systems/ml_systems.bib | 2 +- contents/ml_systems/ml_systems.qmd | 15 +- contents/ops/ops.qmd | 1 + contents/optimizations/optimizations.qmd | 1 + .../privacy_security/privacy_security.qmd | 1 + contents/responsible_ai/responsible_ai.qmd | 2 + contents/robust_ai/robust_ai.qmd | 1 + contents/sustainable_ai/sustainable_ai.qmd | 1 + contents/training/training.qmd | 2 + 14 files changed, 101 insertions(+), 77 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 9b828ea28..6bd7419f0 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -69,74 +69,74 @@ book: - part: FRONT MATTER chapters: - index.qmd - # - contents/dedication.qmd - # - contents/acknowledgements/acknowledgements.qmd - # - contents/contributors.qmd - # - contents/copyright.qmd - # - contents/about.qmd + - contents/dedication.qmd + - contents/acknowledgements/acknowledgements.qmd + - contents/contributors.qmd + - contents/copyright.qmd + - contents/about.qmd - text: "---" - part: MAIN - part: Fundamentals chapters: -# - contents/introduction/introduction.qmd + - contents/introduction/introduction.qmd - contents/ml_systems/ml_systems.qmd - # - contents/dl_primer/dl_primer.qmd - # - part: Workflow - # chapters: - # - contents/workflow/workflow.qmd - # - contents/data_engineering/data_engineering.qmd - # - contents/frameworks/frameworks.qmd - # - part: Training - # chapters: - # - contents/training/training.qmd - # - contents/efficient_ai/efficient_ai.qmd - # - contents/optimizations/optimizations.qmd - # - contents/hw_acceleration/hw_acceleration.qmd - # - part: Deployment - # chapters: - # - contents/benchmarking/benchmarking.qmd - # - contents/ondevice_learning/ondevice_learning.qmd - # - contents/ops/ops.qmd - # - part: Advanced Topics - # chapters: - # - contents/privacy_security/privacy_security.qmd - # - contents/responsible_ai/responsible_ai.qmd - # - contents/sustainable_ai/sustainable_ai.qmd - # - contents/robust_ai/robust_ai.qmd - # - contents/generative_ai/generative_ai.qmd - # - part: Social Impact - # chapters: - # - contents/ai_for_good/ai_for_good.qmd - # - part: Closing - # chapters: - # - contents/conclusion/conclusion.qmd - # - text: "---" - # # LABS - # - part: LABS - # # getting started - # chapters: - # - contents/labs/labs.qmd - # - contents/labs/getting_started.qmd - # # nicla vision - # - part: contents/labs/arduino/nicla_vision/nicla_vision.qmd - # chapters: - # - contents/labs/arduino/nicla_vision/setup/setup.qmd - # - contents/labs/arduino/nicla_vision/image_classification/image_classification.qmd - # - contents/labs/arduino/nicla_vision/object_detection/object_detection.qmd - # - contents/labs/arduino/nicla_vision/kws/kws.qmd - # - contents/labs/arduino/nicla_vision/motion_classification/motion_classification.qmd - # # xiao sense - # - part: contents/labs/seeed/xiao_esp32s3/xiao_esp32s3.qmd - # chapters: - # - contents/labs/seeed/xiao_esp32s3/setup/setup.qmd - # - contents/labs/seeed/xiao_esp32s3/image_classification/image_classification.qmd - # - contents/labs/seeed/xiao_esp32s3/object_detection/object_detection.qmd - # - contents/labs/seeed/xiao_esp32s3/kws/kws.qmd - # - contents/labs/seeed/xiao_esp32s3/motion_classification/motion_classification.qmd - # - part: contents/labs/shared/shared.qmd - # chapters: - # - contents/labs/shared/kws_feature_eng/kws_feature_eng.qmd - # - contents/labs/shared/dsp_spectral_features_block/dsp_spectral_features_block.qmd + - contents/dl_primer/dl_primer.qmd + - part: Workflow + chapters: + - contents/workflow/workflow.qmd + - contents/data_engineering/data_engineering.qmd + - contents/frameworks/frameworks.qmd + - part: Training + chapters: + - contents/training/training.qmd + - contents/efficient_ai/efficient_ai.qmd + - contents/optimizations/optimizations.qmd + - contents/hw_acceleration/hw_acceleration.qmd + - part: Deployment + chapters: + - contents/benchmarking/benchmarking.qmd + - contents/ondevice_learning/ondevice_learning.qmd + - contents/ops/ops.qmd + - part: Advanced Topics + chapters: + - contents/privacy_security/privacy_security.qmd + - contents/responsible_ai/responsible_ai.qmd + - contents/sustainable_ai/sustainable_ai.qmd + - contents/robust_ai/robust_ai.qmd + - contents/generative_ai/generative_ai.qmd + - part: Social Impact + chapters: + - contents/ai_for_good/ai_for_good.qmd + - part: Closing + chapters: + - contents/conclusion/conclusion.qmd + - text: "---" + # LABS + - part: LABS + # getting started + chapters: + - contents/labs/labs.qmd + - contents/labs/getting_started.qmd + # nicla vision + - part: contents/labs/arduino/nicla_vision/nicla_vision.qmd + chapters: + - contents/labs/arduino/nicla_vision/setup/setup.qmd + - contents/labs/arduino/nicla_vision/image_classification/image_classification.qmd + - contents/labs/arduino/nicla_vision/object_detection/object_detection.qmd + - contents/labs/arduino/nicla_vision/kws/kws.qmd + - contents/labs/arduino/nicla_vision/motion_classification/motion_classification.qmd + # xiao sense + - part: contents/labs/seeed/xiao_esp32s3/xiao_esp32s3.qmd + chapters: + - contents/labs/seeed/xiao_esp32s3/setup/setup.qmd + - contents/labs/seeed/xiao_esp32s3/image_classification/image_classification.qmd + - contents/labs/seeed/xiao_esp32s3/object_detection/object_detection.qmd + - contents/labs/seeed/xiao_esp32s3/kws/kws.qmd + - contents/labs/seeed/xiao_esp32s3/motion_classification/motion_classification.qmd + - part: contents/labs/shared/shared.qmd + chapters: + - contents/labs/shared/kws_feature_eng/kws_feature_eng.qmd + - contents/labs/shared/dsp_spectral_features_block/dsp_spectral_features_block.qmd - text: "---" # REFERENCES - part: REFERENCES @@ -210,10 +210,6 @@ editor: format: html: - reference-location: margin - citation-location: margin - sidenote: true # Enable sidenotes for Tufte style - theme: light: - spacelab @@ -223,8 +219,10 @@ format: - darkly - style.scss - style-dark.scss - mainfont: "ETBembo" # Tufte-inspired font - fontsize: 1rem + reference-location: margin + citation-location: margin + citeproc: true + sidenote: true # Enable sidenotes for Tufte style linkcolor: "#A51C30" urlcolor: "#A51C30" highlight-style: github @@ -239,7 +237,7 @@ format: fig-height: 6 number-depth: 3 toc: true - toc-depth: 4 + toc-depth: 4 include-in-header: text: | @@ -248,8 +246,6 @@ format: - - citeproc: true pdf: reference-location: margin @@ -316,7 +312,6 @@ format: } \usepackage{marginfix} % Fixes the issue of margin notes being cut off \usepackage{marginnote} - \reversemarginpar \patchcmd{\chapter}{\thispagestyle{plain}}{\thispagestyle{fancy}}{}{} diff --git a/contents/ai_for_good/ai_for_good.qmd b/contents/ai_for_good/ai_for_good.qmd index 0ba45801e..3a00a5755 100644 --- a/contents/ai_for_good/ai_for_good.qmd +++ b/contents/ai_for_good/ai_for_good.qmd @@ -290,3 +290,6 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + + + diff --git a/contents/data_engineering/data_engineering.qmd b/contents/data_engineering/data_engineering.qmd index 533f1930a..13cd655b4 100644 --- a/contents/data_engineering/data_engineering.qmd +++ b/contents/data_engineering/data_engineering.qmd @@ -541,3 +541,6 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + + + diff --git a/contents/frameworks/frameworks.qmd b/contents/frameworks/frameworks.qmd index 110bedf2f..b3a32710b 100644 --- a/contents/frameworks/frameworks.qmd +++ b/contents/frameworks/frameworks.qmd @@ -795,3 +795,6 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + + + diff --git a/contents/introduction/introduction.qmd b/contents/introduction/introduction.qmd index 3ab8396f9..ee77a896f 100644 --- a/contents/introduction/introduction.qmd +++ b/contents/introduction/introduction.qmd @@ -12,7 +12,7 @@ In the early 1990s, [Mark Weiser](https://en.wikipedia.org/wiki/Mark_Weiser), a ![Ubiqutous computing.](images/png/21st_computer.png){#fig-ubiqutous width=50%} -In the vision of ubiquitous computing[@weiser1991computer], the integration of processors into everyday objects is just one aspect of a larger paradigm shift. The true essence of this vision lies in creating an intelligent environment that can anticipate our needs and act on our behalf, enhancing our experiences without requiring explicit commands. To achieve this level of pervasive intelligence, it is crucial to develop and deploy machine learning systems that span the entire ecosystem, from the cloud to the edge and even to the tiniest IoT devices. +In the vision of ubiquitous computing [@weiser1991computer], the integration of processors into everyday objects is just one aspect of a larger paradigm shift. The true essence of this vision lies in creating an intelligent environment that can anticipate our needs and act on our behalf, enhancing our experiences without requiring explicit commands. To achieve this level of pervasive intelligence, it is crucial to develop and deploy machine learning systems that span the entire ecosystem, from the cloud to the edge and even to the tiniest IoT devices. By distributing machine learning capabilities across the computing continuum, we can harness the strengths of each layer while mitigating their limitations. The cloud, with its vast computational resources and storage capacity, is ideal for training complex models on large datasets and performing resource-intensive tasks. Edge devices, such as gateways and smartphones, can process data locally, enabling faster response times, improved privacy, and reduced bandwidth requirements. Finally, the tiniest IoT devices, equipped with machine learning capabilities, can make quick decisions based on sensor data, enabling highly responsive and efficient systems. diff --git a/contents/ml_systems/ml_systems.bib b/contents/ml_systems/ml_systems.bib index 941d43fbc..f70ad8c56 100644 --- a/contents/ml_systems/ml_systems.bib +++ b/contents/ml_systems/ml_systems.bib @@ -10,7 +10,7 @@ @misc{armcomfuture @article{lin2023tiny, author = {Lin, Ji and Zhu, Ligeng and Chen, Wei-Ming and Wang, Wei-Chen and Han, Song}, - title = {Tiny Machine Learning: {Progress} and Futures {[Feature]}}, + title = {Tiny Machine Learning: Progress and Futures Feature}, journal = {IEEE Circuits Syst. Mag.}, volume = {23}, number = {3}, diff --git a/contents/ml_systems/ml_systems.qmd b/contents/ml_systems/ml_systems.qmd index 497653baa..7df9f0da6 100644 --- a/contents/ml_systems/ml_systems.qmd +++ b/contents/ml_systems/ml_systems.qmd @@ -28,7 +28,7 @@ As this chapter progresses, we will explore embedded systems' complex and fascin ::: -## Machine Learning Systems +## Introductions ML is rapidly evolving, with new paradigms reshaping how models are developed, trained, and deployed. One such paradigm is embedded machine learning, which is experiencing significant innovation driven by the proliferation of smart sensors, edge devices, and microcontrollers. Embedded machine learning refers to the integration of machine learning algorithms into the hardware of a device, enabling real-time data processing and analysis without relying on cloud connectivity. This chapter explores the landscape of embedded machine learning, covering the key approaches of Cloud ML, Edge ML, and TinyML (@fig-cloud-edge-tinyml-comparison). @@ -38,7 +38,18 @@ ML began with Cloud ML, where powerful servers in the cloud were used to train a @fig-vMLsizes shows the key differences between Cloud ML, Edge ML, and TinyML in terms of hardware, latency, connectivity, power requirements, and model complexity. This significant disparity in available resources poses challenges when attempting to deploy deep learning models on microcontrollers, as these models often require substantial memory and storage. For instance, widely used deep learning models such as ResNet-50 exceed the resource limits of microcontrollers by a factor of around 100, while more efficient models like MobileNet-V2 still surpass these constraints by a factor of approximately 20. Even when quantized to use 8-bit integers (int8) for reduced memory usage, MobileNetV2 requires more than 5 times the memory typically available on a microcontroller, making it difficult to fit the model on these tiny devices. -![From cloud GPUs to microcontrollers: Navigating the memory and storage landscape across computing devices. Credit: @lin2023tiny.](./images/jpg/cloud_mobile_tiny_sizes.jpg){#fig-vMLsizes} +![From cloud GPUs to microcontrollers: Navigating the memory and storage landscape across computing devices. Credit: [@lin2023tiny]](./images/jpg/cloud_mobile_tiny_sizes.jpg){#fig-vMLsizes} + + ## Cloud ML diff --git a/contents/ops/ops.qmd b/contents/ops/ops.qmd index c12f1dcb5..809157d37 100644 --- a/contents/ops/ops.qmd +++ b/contents/ops/ops.qmd @@ -975,3 +975,4 @@ In addition to exercises, we also offer a series of hands-on labs that allow stu * _Coming soon._ ::: + diff --git a/contents/optimizations/optimizations.qmd b/contents/optimizations/optimizations.qmd index e2836c779..9a6ec40c5 100644 --- a/contents/optimizations/optimizations.qmd +++ b/contents/optimizations/optimizations.qmd @@ -1009,3 +1009,4 @@ In addition to exercises, we also offer a series of hands-on labs that allow stu * *Coming soon.* ::: + diff --git a/contents/privacy_security/privacy_security.qmd b/contents/privacy_security/privacy_security.qmd index eb079e2f3..0c74e5f4e 100644 --- a/contents/privacy_security/privacy_security.qmd +++ b/contents/privacy_security/privacy_security.qmd @@ -1150,3 +1150,4 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + diff --git a/contents/responsible_ai/responsible_ai.qmd b/contents/responsible_ai/responsible_ai.qmd index 931d730be..f7e044fc9 100644 --- a/contents/responsible_ai/responsible_ai.qmd +++ b/contents/responsible_ai/responsible_ai.qmd @@ -502,3 +502,5 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + + diff --git a/contents/robust_ai/robust_ai.qmd b/contents/robust_ai/robust_ai.qmd index 7a54cf5cd..121666327 100644 --- a/contents/robust_ai/robust_ai.qmd +++ b/contents/robust_ai/robust_ai.qmd @@ -1067,3 +1067,4 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + diff --git a/contents/sustainable_ai/sustainable_ai.qmd b/contents/sustainable_ai/sustainable_ai.qmd index 62027e84a..c39893673 100644 --- a/contents/sustainable_ai/sustainable_ai.qmd +++ b/contents/sustainable_ai/sustainable_ai.qmd @@ -708,3 +708,4 @@ In addition to exercises, we offer hands-on labs that allow students to gain pra * _Coming soon._ ::: + diff --git a/contents/training/training.qmd b/contents/training/training.qmd index c7bda8f0a..f25998162 100644 --- a/contents/training/training.qmd +++ b/contents/training/training.qmd @@ -1167,3 +1167,5 @@ In addition to exercises, we offer a series of hands-on labs allowing students t * _Coming soon._ ::: + + From 303e7be7f529cf81dc63f23f527f6b4a1fff4b54 Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Sun, 4 Aug 2024 17:58:00 -0400 Subject: [PATCH 6/6] Removed special font that's not needed that causes Git build failure --- _quarto.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 6bd7419f0..f0f284cc7 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -252,8 +252,6 @@ format: citation-location: block title-block-style: none indent: 0px - sansfont: "TeX Gyre Heros" - sansfontoptions: "Scale=MatchUppercase" documentclass: scrbook classoption: [abstract,openleft,sfsidenotes] keep-tex: true