[PS] Examples

This commit is contained in:
RobinB27
2026-08-02 17:33:31 +02:00
parent 2c78dcf700
commit db048650e2
9 changed files with 62 additions and 7 deletions
+1 -1
View File
@@ -1 +1 @@
\textit{placeholder}
\subtext{Wherever $\Vert\cdot\Vert_p$ isn't specified, $p=2$.}
+29
View File
@@ -501,6 +501,35 @@ $$
$$
}
\newpage
\subsection{Network sizes}
{\footnotesize
\textbf{Example}: CNN vs FCNN (MLP) Parameter counts.
We can model an RGB Image as $\mathbf{I}\in\R^{1920\times1080\times3}$ where
$(\mathbf{I}_{i,j,1},\mathbf{I}_{i,j,2},\mathbf{I}_{i,j,3})$ are the RGB values of pixel $(i,j)$. We use a CNN \& FCNN to analyze.
For an FCNN $N$ with $1$ hidden layer with $h$ nodes, and $o$ output nodes:
$$
\text{size}(N) = \underbrace{(1920 \cdot 1080 \cdot h)}_{\text{All-to-All}} + \underbrace{(h \cdot o)}_\text{Output} + \underbrace{(h + o)}_\text{Bias}
$$
For a CNN $N'$ with an $n\times n$ Filter, padding $p$ and stride $s$:
$$
\text{size}(N') = \biggl(\frac{1920 + 2\cdot p - n}{s}+1\biggr)\cdot\biggl(\frac{1080+2\cdot p - n}{s}+1\biggr)
$$
The advantage of CNNs becomes clear when plugging in values, e.g.
$$
N:\ h=256, o=10 \qquad N':\ n=4, p=2, s=2
$$
$$
\text{size}(N) = 1'592'527'626 \qquad \text{size}(N') = 519'901
$$
}
\subsubsection{Multidimensional Convolution}
\textbf{TODO} add explanation
+7 -2
View File
@@ -18,6 +18,8 @@ There are many use-cases:
The goal here is to group inputs into clusters, based on some definiton of similarity, e.g. $l_2$ distance for $\mathcal{D} \subset \R^2$.\\
\subtext{This can be seen as the unsupervised analogy to classification}
\subsubsection{Basic Methods}
\method \textbf{Hierarchical Clustering}
A simple method, using the "similarity" measure directly.
@@ -58,11 +60,14 @@ $$
$$
\subtext{(minimize the sum of sq. distances between points \& their centers)}
So we are searching:
{\footnotesize
\remark $\Vert\cdot\Vert_2$ corresponds to the \textit{mean}. $\Vert\cdot\Vert_1$ would use the \textit{median}.
}
So we are searching: (non-convex \& NP-hard)
$$
\underset{\mu}{\text{arg min}} \Bigl( \hat{R}(\mu) \Bigr) \qquad {\color{gray}\footnotesize \text{(optimal $k$-means cluster)}}
$$
\remark This is non-convex \& NP-hard.
\method \textbf{Lloyd's Heuristic}