Skip to content

Commit 271be8d

Browse files
committed
update week 3
1 parent 7575dcb commit 271be8d

File tree

15 files changed

+14885
-3306
lines changed

15 files changed

+14885
-3306
lines changed

doc/pub/week3/html/week3-bs.html

Lines changed: 2652 additions & 671 deletions
Large diffs are not rendered by default.

doc/pub/week3/html/week3-reveal.html

Lines changed: 2523 additions & 633 deletions
Large diffs are not rendered by default.

doc/pub/week3/html/week3-solarized.html

Lines changed: 2584 additions & 620 deletions
Large diffs are not rendered by default.

doc/pub/week3/html/week3.html

Lines changed: 2584 additions & 620 deletions
Large diffs are not rendered by default.
32.7 KB
Binary file not shown.

doc/pub/week3/ipynb/week3.ipynb

Lines changed: 2171 additions & 748 deletions
Large diffs are not rendered by default.

doc/src/week3/.dlog

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
*** error: more than one subsection in a slide (insert missing !split):
2+
% !split
3+
\subsection{Generalizing the above one-dimensional case}
4+
5+
In order to align the above simple case with the more general convolution cases, we rename $\bm{\alpha}$, whose length is $m=3$, with $\bm{w}$.
6+
We will interpret $\bm{w}$ as a weight/filter function with which we want to perform the convolution with an input varibale $\bm{x}$.
7+
We replace thus $\bm{\beta}$ with $\bm{x}$ and $\bm{\delta}$ with $\bm{s}$ and have
8+
\[
9+
s(i) \left(x*w\right)(i)= \sum_{k=0}^{k=m-1}w(k)x(i-k),
10+
\]
11+
where $m=3$ in our case, the maximum length of the vector $\bm{w}$.
12+
Here the symbol $*$ represents the mathematical operation of convolution.
13+
14+
\subsection{Two-dimensional Objects}
15+
16+
We are now ready to start studying the discrete convolutions relevant for convolutional neural networks.
17+
We often use convolutions over more than one dimension at a time. If
18+
we have a two-dimensional image $X$ as input, we can have a \textbf{filter}
19+
defined by a two-dimensional \textbf{kernel/weight/filter} $W$. This leads to an output $Y$
20+
21+
\[
22+
Y(i,j)=(X * W)(i,j) = \sum_m\sum_n X(m,n)W(i-m,j-n).
23+
\]
24+
25+
Convolution is a commutative process, which means we can rewrite this equation as
26+
\[
27+
Y(i,j)=(X * W)(i,j) = \sum_m\sum_n X(i-m,j-n)W(m,n).
28+
\]
29+
30+
Normally the latter is more straightforward to implement in a machine larning library since there is less variation in the range of values of $m$ and $n$.
31+
32+
Many deep learning libraries implement cross-correlation instead of convolution (although it is referred to s convolution)
33+
Y(i,j)=(X * W)(i,j) = \sum_m\sum_n X(i+m,j+n)W(m,n).
34+
\]
35+
36+

doc/src/week3/figslides/cnn.jpeg

23.9 KB
Loading
94.1 KB
Loading
27.6 KB
Loading

0 commit comments

Comments
 (0)