diff --git a/_extensions/custom-numbered-blocks/style/foldbox.css b/_extensions/custom-numbered-blocks/style/foldbox.css index c9bcf92ce..c7a0b8143 100644 --- a/_extensions/custom-numbered-blocks/style/foldbox.css +++ b/_extensions/custom-numbered-blocks/style/foldbox.css @@ -3,7 +3,7 @@ details.fbx-default, details.fbx-answer, details.fbx-question { --text-color: #3c3c3c; - --font-size: 0.85rem; + --font-size: 1rem; --font-family: var(--bs-body-font-family, system-ui, sans-serif); --border-radius: 0.3rem; --border-left-width: 4px; diff --git a/_extensions/custom-numbered-blocks/style/foldbox.tex b/_extensions/custom-numbered-blocks/style/foldbox.tex index ec0be7e5f..caa3ee6c6 100644 --- a/_extensions/custom-numbered-blocks/style/foldbox.tex +++ b/_extensions/custom-numbered-blocks/style/foldbox.tex @@ -11,7 +11,7 @@ \begin{tcolorbox}[ enhanced, breakable, - fontupper=\fontsize{8pt}{10}\selectfont, + %fontupper=\fontsize{8pt}{10}\selectfont, before skip=6pt, % space avove box after skip=6pt, % space below box attach boxed title to top*={xshift=0pt}, @@ -52,17 +52,17 @@ \newenvironment{fbxSimple}[3]{\begin{tcolorbox}[ enhanced, breakable, - fontupper=\fontsize{8pt}{10}\selectfont, + %fontupper=\fontsize{8pt}{10}\selectfont, before skip=6pt, % space avove box after skip=6pt, % space below box attach boxed title to top*={xshift=0pt}, boxed title style={ %fuzzy shadow={1pt}{-1pt}{0mm}{0.1mm}{gray}, - arc=4.5pt, + arc=1.5pt, rounded corners=north, sharp corners=south, - top=8pt, - bottom=7pt, + top=5pt, + bottom=4pt, overlay={ \node [left,outer sep=0em, black,draw=none,anchor=west, rectangle,fill=none,inner sep=0pt] @@ -74,17 +74,16 @@ colback=white, coltitle=black, titlerule=0mm, - toprule=1.2pt, - bottomrule=1.2pt, - leftrule=3pt, - rightrule=1.2pt, - outer arc=4.5pt, - arc=4.5pt, + toprule=0.5pt, + bottomrule=0.5pt, + leftrule=2.2pt, + rightrule=0.5pt, + outer arc=1.5pt, + arc=1.5pt, left=0.3em, bottomtitle=1mm, toptitle=1mm, - title=\hspace{2.3 - em}\textbf{#2}\hspace{0.1em}{#3}, + title=\hspace{2.3em}\textbf{#2}\hspace{0.1em}{#3}, extras middle and last={top=3pt} ]} {\end{tcolorbox}} diff --git a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.pdf b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.pdf index 2de1d763c..6ed9d5307 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.pdf and b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.pdf differ diff --git a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.png b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.png index 0f972f4b0..cf83368d9 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.png and b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-slides.png differ diff --git a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.pdf b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.pdf index 352ca6299..6e51201d4 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.pdf and b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.pdf differ diff --git a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.png b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.png index a4a5d0aac..084cd3105 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.png and b/_extensions/custom-numbered-blocks/style/icons/Icon_callout-resource-videos.png differ diff --git a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.pdf b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.pdf index 7066ccb1b..e3cde7081 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.pdf and b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.pdf differ diff --git a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.png b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.png index eccdfaedd..046ac1df0 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.png and b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-answer.png differ diff --git a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.pdf b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.pdf index 4763e0d0b..5c42cdf3c 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.pdf and b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.pdf differ diff --git a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.png b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.png index 6781cf630..8b8015e7c 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.png and b/_extensions/custom-numbered-blocks/style/icons/icon_callout-quiz-question.png differ diff --git a/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.pdf b/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.pdf index ff0c5b0e7..aa2034c2d 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.pdf and b/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.pdf differ diff --git a/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.png b/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.png index 85cb4fbe2..d20efd1e6 100644 Binary files a/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.png and b/_extensions/custom-numbered-blocks/style/icons/icon_callout-resource-exercises.png differ diff --git a/_quarto.yml b/_quarto.yml index 1e9657432..e3dfaacbc 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -115,7 +115,7 @@ book: # - contents/core/ml_systems/ml_systems.qmd # - contents/core/dl_primer/dl_primer.qmd # - contents/core/dnn_architectures/dnn_architectures.qmd - # - part: contents/parts/design_principles.qmd + - part: contents/parts/design_principles.qmd # - contents/core/workflow/workflow.qmd # - contents/core/data_engineering/data_engineering.qmd # - contents/core/frameworks/frameworks.qmd @@ -124,14 +124,14 @@ book: # - contents/core/optimizations/optimizations.qmd # - contents/core/hw_acceleration/hw_acceleration.qmd # - contents/core/benchmarking/benchmarking.qmd - # - part: contents/parts/best_practices.qmd + - part: contents/parts/best_practices.qmd # - contents/core/ops/ops.qmd # - contents/core/ondevice_learning/ondevice_learning.qmd # - contents/core/privacy_security/privacy_security.qmd # - contents/core/responsible_ai/responsible_ai.qmd # - contents/core/sustainable_ai/sustainable_ai.qmd # - contents/core/robust_ai/robust_ai.qmd - # - part: contents/parts/impact_outlook.qmd + - part: contents/parts/impact_outlook.qmd # - contents/core/ai_for_good/ai_for_good.qmd # - contents/core/conclusion/conclusion.qmd # - text: "---" @@ -168,13 +168,13 @@ book: # chapters: # - contents/labs/shared/kws_feature_eng/kws_feature_eng.qmd # - contents/labs/shared/dsp_spectral_features_block/dsp_spectral_features_block.qmd - # - text: "---" - # - part: "RESOURCES" - # chapters: - # - contents/backmatter/resources/phd_survival_guide.qmd - # - text: "---" - # - part: "REFERENCES" - # - contents/backmatter/appendix/references.qmd + - text: "---" + - part: "RESOURCES" + chapters: + - contents/backmatter/resources/phd_survival_guide.qmd + - text: "---" + - part: "REFERENCES" + - contents/backmatter/references.qmd bibliography: - contents/core/introduction/introduction.bib @@ -220,7 +220,7 @@ filters: - lua/sidenote.lua - diagram - custom-numbered-blocks - - diagram + - inject-partsummary.lua diagram: engine: @@ -455,26 +455,26 @@ format: custom-numbered-blocks: groups: quiz-question: - colors: ["e6f0fa", "5b8cbf"] + colors: ["E1F3F8", "119EC7"] collapse: false quiz-answer: - colors: ["fceeee", "b54b4b"] + colors: ["FAEAF1", "980e5a"] collapse: true resource-slides: - colors: ["e6f3ec", "5ba874"] + colors: ["E9F3E3", "55984D"] collapse: false numbered: false resource-videos: - colors: ["fff4e6", "e67e22"] + colors: ["f9f5f0", "8b5e3c"] collapse: false numbered: false resource-exercises: - colors: ["f7f0fa", "a95cb4"] + colors: ["f7f0fa", "815AA4"] collapse: false - numbered: false + numbered: false classes: - callout-quiz-question: + callout-quiz-question: label: "Self-Check: Question" group: quiz-question callout-quiz-answer: @@ -489,6 +489,5 @@ custom-numbered-blocks: callout-resource-exercises: label: "Exercises" group: resource-exercises - resources: - CNAME \ No newline at end of file diff --git a/contents/core/ai_for_good/ai_for_good.qmd b/contents/core/ai_for_good/ai_for_good.qmd index 02edd5041..d3ccadd06 100644 --- a/contents/core/ai_for_good/ai_for_good.qmd +++ b/contents/core/ai_for_good/ai_for_good.qmd @@ -1038,7 +1038,6 @@ These patterns will evolve as technological capabilities advance and deployment The systematic application of these design patterns, informed by rigorous analysis of deployment contexts and constraints, enables the development of ML systems that function effectively across the computing spectrum while delivering sustainable social impact. - ## Resources {#sec-ai-good-resources-09a3} :::{.callout-note collapse="false" title="Slides"} diff --git a/contents/core/introduction/introduction.qmd b/contents/core/introduction/introduction.qmd index 5949986fd..aea7fc2cf 100644 --- a/contents/core/introduction/introduction.qmd +++ b/contents/core/introduction/introduction.qmd @@ -7,24 +7,83 @@ quiz: introduction_quizzes.json ![_DALL·E 3 Prompt: A detailed, rectangular, flat 2D illustration depicting a roadmap of a book's chapters on machine learning systems, set on a crisp, clean white background. The image features a winding road traveling through various symbolic landmarks. Each landmark represents a chapter topic: Introduction, ML Systems, Deep Learning, AI Workflow, Data Engineering, AI Frameworks, AI Training, Efficient AI, Model Optimizations, AI Acceleration, Benchmarking AI, On-Device Learning, Embedded AIOps, Security & Privacy, Responsible AI, Sustainable AI, AI for Good, Robust AI, Generative AI. The style is clean, modern, and flat, suitable for a technical book, with each landmark clearly labeled with its chapter title._](images/png/cover_introduction.png) + + +::: {.callout-note} +Note that there are five types of callouts, including: +`note`, `warning`, `important`, `tip`, and `caution`. +::: + +This is an example + +::: {.callout-warning} +This is an warning of a callout with a title. +::: + +This is an example + +::: {.callout-important} +Note that there are five types of callouts, including: +`note`, `warning`, `important`, `tip`, and `caution`. +::: + +This is an example + +::: {.callout-tip} +This is an example of a callout with a title. +::: + +::: {.content-visible when-format="html"} +::: {.callout-caution collapse="true"} + +This is an example of a 'folded' caution callout that can be expanded by the user. You can use `collapse="true"` to collapse it by default or `collapse="false"` to make a collapsible callout that is expanded by default. +::: +::: + +This is an example of a 'folded' caution callout that can be expanded by the user. + +::: {.callout-resource-slides #resource-slides-basics-1} +As concerns about computational costs and environmental impact grow, there's an increasing focus on making ML systems more efficient. +::: + +This is an example + +::: {.callout-resource-videos #resource-videos-basics-1} +One of the most significant trends is the democratization of AI technology. Just as personal computers transformed computing from specialized mainframes to everyday tools, +::: + +This is an example + +::: {.callout-resource-exercises #resource-exercises-basics-1} +This democratization is enabling new applications across industries, from small businesses using AI for customer service to researchers applying ML to previously intractable problems. +::: + +::: {.callout-quiz-question #quiz-question-sec-introduction-ai-ml-basics-041a} + +1. What is the primary distinction between Artificial Intelligence (AI) and Machine Learning (ML)? + + A) AI focuses on creating intelligent behavior, while ML is about implementing intelligence through predetermined rules. + +See Answer \ref{quiz-answer-sec-introduction-ai-ml-basics-041a}. + +::: + +::: {.callout-quiz-answer #quiz-answer-sec-introduction-ai-ml-basics-041a} + +1. **What is the primary distinction between Artificial Intelligence (AI) and Machine Learning (ML)?** + + A) AI focuses on creating intelligent behavior, while ML is about implementing intelligence through predetermined rules. + +::: + + + ## AI Pervasiveness {#sec-introduction-ai-pervasiveness-43b2} Artificial Intelligence (AI) has emerged as one of the most transformative forces in human history. From the moment we wake up to when we go to sleep, AI systems invisibly shape our world. They manage traffic flows in our cities, optimize power distribution across electrical grids, and enable billions of wireless devices to communicate seamlessly. In hospitals, AI analyzes medical images and helps doctors diagnose diseases. In research laboratories, it accelerates scientific discovery by simulating molecular interactions and processing vast datasets from particle accelerators. In space exploration, it helps rovers navigate distant planets and telescopes detect new celestial phenomena. -::: {.callout-resource-slides #resource-slides-basics-1} -As concerns about computational costs and environmental impact grow, there's an increasing focus on making ML systems more efficient. Researchers are developing new techniques for training models with less data and computing power. Innovation in specialized hardware, from improved GPUs to custom AI chips, is making ML systems faster and more energy-efficient. These advances could make sophisticated AI capabilities available on more devices, from smartphones to IoT sensors. -::: - -::: {.callout-resource-videos #resource-videos-basics-1} -One of the most significant trends is the democratization of AI technology. Just as personal computers transformed computing from specialized mainframes to everyday tools, ML systems are becoming more accessible to developers and organizations of all sizes. Cloud providers now offer pre-trained models and automated ML platforms that reduce the expertise needed to deploy AI solutions. This democratization is enabling new applications across industries, from small businesses using AI for customer service to researchers applying ML to previously intractable problems. -::: - Throughout history, certain technologies have fundamentally transformed human civilization, defining their eras. The 18th and 19th centuries were shaped by the Industrial Revolution, where steam power and mechanization transformed how humans could harness physical energy. The 20th century was defined by the Digital Revolution, where the computer and internet transformed how we process and share information. Now, the 21st century appears to be the era of Artificial Intelligence, a shift noted by leading thinkers in technological evolution [@brynjolfsson2014second; @domingos2015master]. -::: {.callout-resource-exercises #resource-exercises-basics-1} -One of the most significant trends is the democratization of AI technology. Just as personal computers transformed computing from specialized mainframes to everyday tools, ML systems are becoming more accessible to developers and organizations of all sizes. Cloud providers now offer pre-trained models and automated ML platforms that reduce the expertise needed to deploy AI solutions. This democratization is enabling new applications across industries, from small businesses using AI for customer service to researchers applying ML to previously intractable problems. -::: - The vision driving AI development extends far beyond the practical applications we see today. We aspire to create systems that can work alongside humanity, enhancing our problem-solving capabilities and accelerating scientific progress. Imagine AI systems that could help us understand consciousness, decode the complexities of biological systems, or unravel the mysteries of dark matter. Consider the potential of AI to help address global challenges like climate change, disease, or sustainable energy production. This is not just about automation or efficiency—it's about expanding the boundaries of human knowledge and capability. The impact of this revolution operates at multiple scales, each with profound implications. At the individual level, AI personalizes our experiences and augments our daily decision-making capabilities. At the organizational level, it transforms how businesses operate and how research institutions make discoveries. At the societal level, it reshapes everything from transportation systems to healthcare delivery. At the global level, it offers new approaches to addressing humanity's greatest challenges, from climate change to drug discovery. @@ -715,9 +774,6 @@ Each pillar represents a critical phase in the lifecycle of ML systems and is co For more detailed information about the book's overview, contents, learning outcomes, target audience, prerequisites, and navigation guide, please refer to the [About the Book](../../frontmatter/about/about.qmd) section. There, you'll also find valuable details about our learning community and how to maximize your experience with this resource. - - - ## Quiz Answers :::{.callout-quiz-answer #quiz-answer-sec-introduction-ai-ml-basics-86ee} diff --git a/contents/core/ml_systems/ml_systems.qmd b/contents/core/ml_systems/ml_systems.qmd index d334a2f69..05a3cc158 100644 --- a/contents/core/ml_systems/ml_systems.qmd +++ b/contents/core/ml_systems/ml_systems.qmd @@ -1284,11 +1284,6 @@ To reinforce the concepts covered in this chapter, we have curated a set of exer - *Coming soon.* ::: - - - - - ## Quiz Answers :::{.callout-quiz-answer #quiz-answer-sec-ml-systems-cloudbased-machine-learning-9ee3} diff --git a/contents/labs/raspi/setup/setup.qmd b/contents/labs/raspi/setup/setup.qmd index b7d0d1412..d089ce62f 100644 --- a/contents/labs/raspi/setup/setup.qmd +++ b/contents/labs/raspi/setup/setup.qmd @@ -499,7 +499,6 @@ libcamera-hello --list-cameras \noindent ![](images/jpeg/list_cams_raspi-zero.jpg) - \noindent ![](images/png/list_cams_raspi-5.png) diff --git a/scripts/collapse_blank_lines.py b/scripts/collapse_blank_lines.py new file mode 100644 index 000000000..938b8a379 --- /dev/null +++ b/scripts/collapse_blank_lines.py @@ -0,0 +1,20 @@ +import sys + +for filepath in sys.argv[1:]: + with open(filepath, encoding="utf-8") as f: + lines = f.readlines() + + new_lines = [] + blank = False + + for line in lines: + if line.strip() == "": + if not blank: + new_lines.append(line) + blank = True + else: + new_lines.append(line) + blank = False + + with open(filepath, "w", encoding="utf-8") as f: + f.writelines(new_lines) diff --git a/tex/header-includes.tex b/tex/header-includes.tex index 5a06c9a66..26c25da64 100644 --- a/tex/header-includes.tex +++ b/tex/header-includes.tex @@ -28,7 +28,7 @@ \usepackage{sidenotes} \usepackage{tikz} \usetikzlibrary{positioning} -\usepackage[explicit]{titlesec} +\usepackage[explicit,newparttoc]{titlesec}% \usepackage{tocloft} \usepackage[dvipsnames]{xcolor} \usepackage{changepage} @@ -191,27 +191,6 @@ aboveskip=0pt pdfstartview=Fit % This sets the initial zoom to fit the page } -%\renewcommand{\part}[1]{% -% \chapter*{#1} % Render the part title without a number -% \addcontentsline{toc}{part}{#1} % Add to TOC without numbering -%} - -% % Redefine \part to do nothing -% \renewcommand{\part}[1]{% -% \typeout{Skipping \detokenize{#1}}% Print message in the log file -% } - -% % Ensure \partname is defined, just in case it's referenced elsewhere -% \renewcommand{\partname}{} - -% % Redefine \part (if you want to apply the Crimson color here) -% \titleformat{\part}[display] -% {\normalfont\Huge\bfseries\color{crimson}} % Set the color to crimson -% {\partname~\thepart} -% {0pt} -% {\Huge} -% [\vspace{20pt}] - % --- Summary text that will be written below \part \newcommand{\partsummary}{} % empty by default \newif\ifhaspartsummary% @@ -225,39 +204,6 @@ aboveskip=0pt \definecolor{BrownLL}{RGB}{233,222,220} \definecolor{BlueDD}{RGB}{62,100,125} \colorlet{BlueDD}{magenta} -\titleformat{\part}[display] -{\thispagestyle{empty}}{}{20pt}{ -\begin{tikzpicture}[remember picture,overlay] -%%% -\coordinate(S1)at([yshift=-200mm]current page.north west); -\draw[draw=none,fill=BlueDD!7](S1)--++(45:16)coordinate(S2)- -|(S2|-current page.north west)--(current page.north west)coordinate(S3)--(S1); -% -\coordinate(E1)at([yshift=-98mm]current page.north west); -\draw[draw=none,fill=BlueDD!15](E1)--(current page.north west)coordinate(E2) ---++(0:98mm)coordinate(E3)--(E1); -% -\coordinate(D1)at([yshift=15mm]current page.south west); -\draw[draw=none,fill=BlueDD!40,opacity=0.5](D1)--++(45:5.5)coordinate(D2) --|(D2|-current page.north west)--(current page.north west)coordinate(D3)--(D1); -%%%% -\path[red](S2)-|(S2-|current page.east)coordinate(SS2); -%PART -\node[crimson,align=flush right,inner sep=0,outer sep=0mm,draw=none,anchor=south, -font={\fontsize{48pt}{48}\selectfont\bfseries}] (BG) at ($(S2)!0.5!(SS2)$){\thepart};%\hphantom{Part}}; -%%% -\path[green]([yshift=15mm]D2)-|coordinate(TPD)(BG.south east); -\node[inner sep=0mm,draw=none,anchor=south east,text width=1\textwidth, -align=flush right,font={\fontsize{40pt}{40}\selectfont}] -(BGG) at (TPD) {\color{crimson}\MakeUppercase {#1}};%\MakeUppercase {} -% -\ifhaspartsummary -\node[inner sep=4pt,text width=0.9\textwidth,draw=none,fill=BrownLL!40, -align=justify,font={\fontsize{9pt}{12}\selectfont},below=of TPD,anchor=north east] -(PS) {\partsummary}; -\fi -\end{tikzpicture} -} \titleformat{\part}[display] {\thispagestyle{empty}}{}{20pt}{ @@ -326,7 +272,6 @@ align=right,font={\fontsize{40pt}{40}\selectfont}] \end{tikzpicture} } - % Redefine \section \titleformat{\section} {\normalfont\Large\bfseries\color{crimson}\raggedright} % Set the color to crimson @@ -400,12 +345,21 @@ align=right,font={\fontsize{40pt}{40}\selectfont}] \renewcommand{\cftchappresnum}{\color{crimson}Chapter~} % Adds "Chapter" in crimson % Customize TOC part format +\renewcommand{\cftpartpresnum}{Part} +\newlength{\xpartspace} +\settowidth{\xpartspace}{\cftpartpresnum} +\addtolength{\cftpartnumwidth}{\xpartspace} \cftpagenumbersoff{part} -\setlength{\cftpartnumwidth}{0pt} + \makeatletter \renewcommand{\cftpartfont}{\hfil\bfseries\color{crimson}} -\renewcommand{\cftpartpresnum}{\begin{lrbox}{\@tempboxa}} -\renewcommand{\cftpartaftersnum}{\end{lrbox}\hfil} +\renewcommand{\cftpartpresnum}{% + \begin{lrbox}{\@tempboxa}% + \bfseries\color{crimson}Part~~\thepart% + \end{lrbox}% + \usebox{\@tempboxa}% +} +\renewcommand{\cftpartaftersnum}{\hfil} \makeatother % Ensure correct spacing for TOC numbering