|
|
|
\documentclass[a4paper, 12pt, draft=true]{article}
|
|
|
|
\usepackage{pgfplots}
|
|
|
|
\usepackage{filecontents}
|
|
|
|
\usepackage{subcaption}
|
|
|
|
\usepackage{adjustbox}
|
|
|
|
\usepackage{xcolor}
|
|
|
|
\usepackage{tabu}
|
|
|
|
\usepackage{showframe}
|
|
|
|
\usepackage{graphicx}
|
|
|
|
\usepackage{titlecaps}
|
|
|
|
\usetikzlibrary{calc, 3d}
|
|
|
|
\usepgfplotslibrary{colorbrewer}
|
|
|
|
|
|
|
|
\newcommand\Tstrut{\rule{0pt}{2.6ex}} % = `top' strut
|
|
|
|
\newcommand\Bstrut{\rule[-0.9ex]{0pt}{0pt}} % = `bottom' strut
|
|
|
|
|
|
|
|
\begin{document}
|
|
|
|
\pgfplotsset{
|
|
|
|
compat=1.11,
|
|
|
|
legend image code/.code={
|
|
|
|
\draw[mark repeat=2,mark phase=2]
|
|
|
|
plot coordinates {
|
|
|
|
(0cm,0cm)
|
|
|
|
(0.3cm,0cm) %% default is (0.3cm,0cm)
|
|
|
|
(0.6cm,0cm) %% default is (0.6cm,0cm)
|
|
|
|
};%
|
|
|
|
}
|
|
|
|
}
|
|
|
|
\begin{figure}
|
|
|
|
\begin{subfigure}[h]{\textwidth}
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[legend cell align={left},yticklabel style={/pgf/number format/fixed,
|
|
|
|
/pgf/number format/precision=3},tick style = {draw = none}, width = \textwidth,
|
|
|
|
height = 0.35\textwidth, legend style={at={(0.9825,0.0175)},anchor=south east},
|
|
|
|
ylabel = {Test Accuracy}, cycle
|
|
|
|
list/Dark2, every axis plot/.append style={line width
|
|
|
|
=1.25pt}]
|
|
|
|
% \addplot [dashed] table
|
|
|
|
% [x=epoch, y=accuracy, col sep=comma, mark = none]
|
|
|
|
% {Data/adam_datagen_full.log};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_1.mean};
|
|
|
|
% \addplot [dashed] table
|
|
|
|
% [x=epoch, y=accuracy, col sep=comma, mark = none]
|
|
|
|
% {Data/adam_datagen_dropout_02_full.log};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_datagen_1.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_datagen_dropout_02_1.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_dropout_02_1.mean};
|
|
|
|
|
|
|
|
|
|
|
|
\addlegendentry{\footnotesize{G.}}
|
|
|
|
\addlegendentry{\footnotesize{G. + D. 0.2}}
|
|
|
|
\addlegendentry{\footnotesize{G. + D. 0.4}}
|
|
|
|
\addlegendentry{\footnotesize{D. 0.2}}
|
|
|
|
\addlegendentry{\footnotesize{D. 0.4}}
|
|
|
|
\addlegendentry{\footnotesize{Default}}
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\caption{1 sample per class}
|
|
|
|
\vspace{0.25cm}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}[h]{\textwidth}
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[legend cell align={left},yticklabel style={/pgf/number format/fixed,
|
|
|
|
/pgf/number format/precision=3},tick style = {draw = none}, width = \textwidth,
|
|
|
|
height = 0.35\textwidth, legend style={at={(0.9825,0.0175)},anchor=south east},
|
|
|
|
ylabel = {Test Accuracy}, cycle
|
|
|
|
list/Dark2, every axis plot/.append style={line width
|
|
|
|
=1.25pt}]
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_dropout_00_10.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_dropout_02_10.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_datagen_dropout_00_10.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_datagen_dropout_02_10.mean};
|
|
|
|
|
|
|
|
|
|
|
|
\addlegendentry{\footnotesize{G.}}
|
|
|
|
\addlegendentry{\footnotesize{G. + D. 0.2}}
|
|
|
|
\addlegendentry{\footnotesize{G. + D. 0.4}}
|
|
|
|
\addlegendentry{\footnotesize{D. 0.2}}
|
|
|
|
\addlegendentry{\footnotesize{D. 0.4}}
|
|
|
|
\addlegendentry{\footnotesize{Default}}
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\caption{10 samples per class}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}[h]{\textwidth}
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[legend cell align={left},yticklabel style={/pgf/number format/fixed,
|
|
|
|
/pgf/number format/precision=3},tick style = {draw = none}, width = 0.9875\textwidth,
|
|
|
|
height = 0.35\textwidth, legend style={at={(0.9825,0.0175)},anchor=south east},
|
|
|
|
xlabel = {epoch}, ylabel = {Test Accuracy}, cycle
|
|
|
|
list/Dark2, every axis plot/.append style={line width
|
|
|
|
=1.25pt}, ymin = {0.92}]
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_dropout_00_100.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_dropout_02_100.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_datagen_dropout_00_100.mean};
|
|
|
|
\addplot table
|
|
|
|
[x=epoch, y=val_accuracy, col sep=comma, mark = none]
|
|
|
|
{Data/adam_datagen_dropout_02_100.mean};
|
|
|
|
|
|
|
|
\addlegendentry{\footnotesize{G.}}
|
|
|
|
\addlegendentry{\footnotesize{G. + D. 0.2}}
|
|
|
|
\addlegendentry{\footnotesize{G. + D. 0.4}}
|
|
|
|
\addlegendentry{\footnotesize{D. 0.2}}
|
|
|
|
\addlegendentry{\footnotesize{D. 0.4}}
|
|
|
|
\addlegendentry{\footnotesize{Default}}
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\caption{100 samples per class}
|
|
|
|
\vspace{.25cm}
|
|
|
|
\end{subfigure}
|
|
|
|
\caption{Accuracy for the net given in ... with Dropout (D.),
|
|
|
|
data generation (G.), a combination, or neither (Default) implemented and trained
|
|
|
|
with \textsc{Adam}. For each epoch the 60.000 training samples
|
|
|
|
were used, or for data generation 10.000 steps with each using
|
|
|
|
batches of 60 generated data points. For each configuration the
|
|
|
|
model was trained 5 times and the average accuracies at each epoch
|
|
|
|
are given in (a). Mean, maximum and minimum values of accuracy on
|
|
|
|
the test and training set are given in (b).}
|
|
|
|
\end{figure}
|
|
|
|
\begin{table}
|
|
|
|
\centering
|
|
|
|
\begin{tabu} to \textwidth {@{}l*4{X[c]}@{}}
|
|
|
|
\Tstrut \Bstrut & \textsc{Adam} & D. 0.2 & Gen & Gen.+D. 0.2 \\
|
|
|
|
\hline
|
|
|
|
&
|
|
|
|
\multicolumn{4}{c}{\titlecap{test accuracy for 1 sample}}\Bstrut \\
|
|
|
|
\cline{2-5}
|
|
|
|
max \Tstrut & 0.5633 & 0.5312 & 0.6704 & 0.6604 \\
|
|
|
|
min & 0.3230 & 0.4224 & 0.4878 & 0.5175 \\
|
|
|
|
mean & 0.4570 & 0.4714 & 0.5862 & 0.6014 \\
|
|
|
|
var & 0.0040 & 0.0012 & 0.0036 & 0.0023 \\
|
|
|
|
\hline
|
|
|
|
&
|
|
|
|
\multicolumn{4}{c}{\titlecap{test accuracy for 10 samples}}\Bstrut \\
|
|
|
|
\cline{2-5}
|
|
|
|
max \Tstrut & 0.8585 & 0.9423 & 0.9310 & 0.9441 \\
|
|
|
|
min & 0.8148 & 0.9081 & 0.9018 & 0.9061 \\
|
|
|
|
mean & 0.8377 & 0.9270 & 0.9185 & 0.9232 \\
|
|
|
|
var & 2.7e-4 & 1.3e-4 & 6e-05 & 1.5e-4 \\
|
|
|
|
\hline
|
|
|
|
&
|
|
|
|
\multicolumn{4}{c}{\titlecap{test accuracy for 100 samples}}\Bstrut \\
|
|
|
|
\cline{2-5}
|
|
|
|
max & 0.9637 & 0.9796 & 0.9810 & 0.9805 \\
|
|
|
|
min & 0.9506 & 0.9719 & 0.9702 & 0.9727 \\
|
|
|
|
mean & 0.9582 & 0.9770 & 0.9769 & 0.9783 \\
|
|
|
|
var & 2e-05 & 1e-05 & 1e-05 & 0 \\
|
|
|
|
\hline
|
|
|
|
\end{tabu}
|
|
|
|
\caption{Values of the test accuracy of the model trained 10 times
|
|
|
|
of random training sets containing 1, 10 and 100 data points per
|
|
|
|
class.}
|
|
|
|
\end{table}
|
|
|
|
|
|
|
|
\begin{center}
|
|
|
|
\begin{figure}[h]
|
|
|
|
\centering
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist0.pdf}
|
|
|
|
\caption{original\\image}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist_gen_zoom.pdf}
|
|
|
|
\caption{random\\zoom}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist_gen_shear.pdf}
|
|
|
|
\caption{random\\shear}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist_gen_rotation.pdf}
|
|
|
|
\caption{random\\rotation}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist_gen_shift.pdf}
|
|
|
|
\caption{random\\positional shift}
|
|
|
|
\end{subfigure}\\
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist5.pdf}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist6.pdf}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist7.pdf}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist8.pdf}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{0.19\textwidth}
|
|
|
|
\includegraphics[width=\textwidth]{Data/mnist9.pdf}
|
|
|
|
\end{subfigure}
|
|
|
|
\caption{The MNIST data set contains 70.000 images of preprocessed handwritten
|
|
|
|
digits. Of these images 60.000 are used as training images, while
|
|
|
|
the rest are used to validate the models trained.}
|
|
|
|
\end{figure}
|
|
|
|
\end{center}
|
|
|
|
|
|
|
|
\begin{figure}
|
|
|
|
\begin{adjustbox}{width=\textwidth}
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{scope}[x = (0:1cm), y=(90:1cm), z=(15:-0.5cm)]
|
|
|
|
\node[canvas is xy plane at z=0, transform shape] at (0,0)
|
|
|
|
{\includegraphics[width=5cm]{Data/klammern_r.jpg}};
|
|
|
|
\node[canvas is xy plane at z=2, transform shape] at (0,-0.2)
|
|
|
|
{\includegraphics[width=5cm]{Data/klammern_g.jpg}};
|
|
|
|
\node[canvas is xy plane at z=4, transform shape] at (0,-0.4)
|
|
|
|
{\includegraphics[width=5cm]{Data/klammern_b.jpg}};
|
|
|
|
\node[canvas is xy plane at z=4, transform shape] at (-8,-0.2)
|
|
|
|
{\includegraphics[width=5.3cm]{Data/klammern_rgb.jpg}};
|
|
|
|
\end{scope}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{adjustbox}
|
|
|
|
\caption{On the right the red, green and blue chanels of the picture
|
|
|
|
are displayed. In order to better visualize the color channes the
|
|
|
|
black and white picture of each channel has been colored in the
|
|
|
|
respective color. Combining the layers results in the image on the
|
|
|
|
left}
|
|
|
|
\end{figure}
|
|
|
|
|
|
|
|
\begin{figure}
|
|
|
|
\centering
|
|
|
|
\begin{subfigure}{.45\linewidth}
|
|
|
|
\centering
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[enlargelimits=false, ymin=0, ymax = 1, width=\textwidth]
|
|
|
|
\addplot [domain=-5:5, samples=101,unbounded coords=jump]{1/(1+exp(-x)};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{.45\linewidth}
|
|
|
|
\centering
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[enlargelimits=false, width=\textwidth]
|
|
|
|
\addplot[domain=-5:5, samples=100]{tanh(x)};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{.45\linewidth}
|
|
|
|
\centering
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[enlargelimits=false, width=\textwidth,
|
|
|
|
ytick={0,2,4},yticklabels={\hphantom{4.}0,2,4}, ymin=-1]
|
|
|
|
\addplot[domain=-5:5, samples=100]{max(0,x)};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{subfigure}
|
|
|
|
\begin{subfigure}{.45\linewidth}
|
|
|
|
\centering
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[enlargelimits=false, width=\textwidth, ymin=-1,
|
|
|
|
ytick={0,2,4},yticklabels={$\hphantom{-5.}0$,2,4}]
|
|
|
|
\addplot[domain=-5:5, samples=100]{max(0,x)+ 0.1*min(0,x)};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
\end{subfigure}
|
|
|
|
\end{figure}
|
|
|
|
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[enlargelimits=false]
|
|
|
|
\addplot [domain=-5:5, samples=101,unbounded coords=jump]{1/(1+exp(-x)};
|
|
|
|
\addplot[domain=-5:5, samples=100]{tanh(x)};
|
|
|
|
\addplot[domain=-5:5, samples=100]{max(0,x)};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
\begin{tikzpicture}
|
|
|
|
\begin{axis}[enlargelimits=false]
|
|
|
|
\addplot[domain=-2*pi:2*pi, samples=100]{cos(deg(x))};
|
|
|
|
\end{axis}
|
|
|
|
\end{tikzpicture}
|
|
|
|
|
|
|
|
\end{document}
|
|
|
|
|
|
|
|
%%% Local Variables:
|
|
|
|
%%% mode: latex
|
|
|
|
%%% TeX-master: t
|
|
|
|
%%% End:
|