Skip to content

Commit 22f24a0

Browse files
committed
Better neural nets description
1 parent 541165c commit 22f24a0

File tree

5 files changed

+41
-20
lines changed

5 files changed

+41
-20
lines changed

slides/imgs/and.pdf

4.19 KB
Binary file not shown.

slides/imgs/or.pdf

4.17 KB
Binary file not shown.

slides/imgs/xor.pdf

4.35 KB
Binary file not shown.

slides/ml_talk.pdf

10.4 KB
Binary file not shown.

slides/ml_talk.tex

+41-20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
% !TEX program = xelatex
22

3-
% arara: xelatex
4-
5-
63
\documentclass[aspectratio=169]{beamer}
74

85
\usepackage{xltxtra}
@@ -17,8 +14,10 @@
1714
\usepackage{amsmath}
1815
\usepackage{smartdiagram}
1916
\usepackage{graphicx}
20-
\usepackage{tikz}
2117
\usepackage{multicol}
18+
\usepackage{tikz}
19+
20+
\usetikzlibrary{shapes}
2221

2322
\lstdefinestyle{codeblock}{
2423
breakatwhitespace=false,
@@ -611,7 +610,7 @@ \section{Neural Networks}
611610
\item<2-> \textbf{Inputs} consisting of $n$ inputs from $x_1$, $x_2$ ... to $x_n$.
612611
\item<3-> \textbf{Weights} of each inputs, namely $w_1$, $w_2$, ..., $w_n$
613612
\item<4-> \textbf{Summation} of all the weighted inputs $\Sigma = w_1x_1 + w_2x_2 + \hdots + w_nx_n$
614-
\item<5-> \textbf{Activation function} in either the form of $\Sigma > k$ or $\Sigma < k (nonlinear)$
613+
\item<5-> \textbf{Activation function} in either the form of $\Sigma > k$ (\textit{nonlinear})
615614
\end{itemize}
616615
\end{frame}
617616

@@ -627,24 +626,28 @@ \section{Neural Networks}
627626
\begin{columns}[t]
628627
\column{0.33\textwidth}
629628
{\large AND gate}
630-
631629
\onslide<2->
632-
\begin{itemize}
633-
\item $w_1 = 1$
634-
\item $w_2 = 1$
635-
\item $\Sigma = 1x_1 + 1x_2$
636-
\item $f: \Sigma \geq 2$
637-
\end{itemize}
630+
\begin{tikzpicture}
631+
\draw [main] (0, 1.5) circle [radius=0.5] node {0/1};
632+
\draw [main] (0, 0) circle [radius=0.5] node {0/1};
633+
\draw [main] (1.5, 0.75) circle [radius=0.5] node {$\Sigma$};
634+
\draw [main] (3, 0.75) circle [radius=0.5] node {$> 1.5$};
635+
\draw [->, main] (0.5, 1.5) -- (1, 1) node [pos=.5] {1};
636+
\draw [->, main] (0.5, 0) -- (1, 0.5) node [pos=.5] {1};
637+
\draw [->, main] (2, 0.75) -- (2.5, 0.75);
638+
\end{tikzpicture}
638639
\column{0.33\textwidth}
639640
{\onslide<1-> \large OR gate}
640-
641641
\onslide<3->
642-
\begin{itemize}
643-
\item $w_1 = 1$
644-
\item $w_2 = 1$
645-
\item $\Sigma = 1x_1 + 1x_2$
646-
\item $f: \Sigma \geq 1$
647-
\end{itemize}
642+
\begin{tikzpicture}
643+
\draw [main] (0, 1.5) circle [radius=0.5] node {0/1};
644+
\draw [main] (0, 0) circle [radius=0.5] node {0/1};
645+
\draw [main] (1.5, 0.75) circle [radius=0.5] node {$\Sigma$};
646+
\draw [main] (3, 0.75) circle [radius=0.5] node {$> 0.5$};
647+
\draw [->, main] (0.5, 1.5) -- (1, 1) node [pos=.5] {1};
648+
\draw [->, main] (0.5, 0) -- (1, 0.5) node [pos=.5] {1};
649+
\draw [->, main] (2, 0.75) -- (2.5, 0.75);
650+
\end{tikzpicture}
648651
\column{0.33\textwidth}
649652
{\onslide<1-> \large XOR gate}
650653

@@ -670,7 +673,25 @@ \section{Neural Networks}
670673
\end{frame}
671674

672675
\begin{frame}
673-
\frametitle{Artificial Neural Networks}
676+
\frametitle{Linearly Seperable?}
677+
\begin{columns}[t]
678+
\column{0.33\textwidth}
679+
{\large AND gate}
680+
\onslide<2->
681+
\includegraphics[width=1.0\textwidth]{imgs/and.pdf}
682+
\column{0.33\textwidth}
683+
{\onslide<1-> \large OR gate}
684+
\onslide<3->
685+
\includegraphics[width=1.0\textwidth]{imgs/or.pdf}
686+
\column{0.33\textwidth}
687+
{\onslide<1-> \large XOR gate}
688+
\onslide<4->
689+
\includegraphics[width=1.0\textwidth]{imgs/xor.pdf}
690+
\end{columns}
691+
\end{frame}
692+
693+
\begin{frame}
694+
\frametitle{Solution for XOR gate}
674695
\begin{center}
675696
\begin{figure}
676697
\includegraphics[width=0.7\linewidth,height=0.7\textheight,keepaspectratio]{imgs/xor_nn.png}

0 commit comments

Comments
 (0)