\pgfplotsset{
compat=1.11,
legend image code/.code={
\draw[mark repeat=2,mark phase=2]
plot coordinates {
(0cm,0cm)
(0.15cm,0cm)        %% default is (0.3cm,0cm)
(0.3cm,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 = 0.975\textwidth,
        height = 0.6\textwidth, ymin = 0.885, 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}]
        % [tick style = {draw = none}, width = \textwidth,
        % height = 0.6\textwidth, ymin = 0.905, legend style={at={(0.9825,0.75)},anchor=north east},
        % xlabel = {epoch}, ylabel = {Classification Accuracy}]
        % \addplot table
        % [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        % {Figures/Data/adagrad.log}; 
        % \addplot table
        % [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        % {Figures/Data/adadelta.log}; 
        % \addplot table
        % [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        % {Figures/Data/adam.log}; 
        \addplot table
        [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        {Figures/Data/Adagrad.mean}; 
        \addplot table
        [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        {Figures/Data/Adadelta.mean}; 
        \addplot table
        [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        {Figures/Data/Adam.mean}; 
        \addplot table
        [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        {Figures/Data/SGD_00.mean}; 
        \addplot table
        [x=epoch, y=val_accuracy, col sep=comma, mark = none]
        {Figures/Data/SGD_09.mean}; 
        
         \addlegendentry{\footnotesize{\textsc{AdaGrad}}}
        \addlegendentry{\footnotesize{\textsc{Adadelta}}}
        \addlegendentry{\footnotesize{\textsc{Adam}}}
        \addlegendentry{\footnotesize{\textsc{Sgd}}}
        \addlegendentry{\footnotesize{Momentum}}
      \end{axis}
    \end{tikzpicture}
    \caption{Test accuracies during training}
    \vspace{.25cm}
  \end{subfigure}
  % \begin{subfigure}[b]{\textwidth}
  %   \begin{tikzpicture}
  %     \begin{axis}[tick style = {draw = none}, width = \textwidth,
  %       height = 0.6\textwidth, ymax = 0.5,
  %       xlabel = {epoch}, ylabel = {Error Measure\vphantom{y}},ytick ={0,0.1,0.2,0.3,0.4,0.45,0.5}, yticklabels =
  %       {0,0.1,0.2,0.3,0.4,\phantom{0.94},0.5}]
  %       \addplot table
  %       [x=epoch, y=val_loss, col sep=comma, mark = none] {Figures/Data/adagrad.log};
  %       \addplot table
  %       [x=epoch, y=val_loss, col sep=comma, mark = none] {Figures/Data/adadelta.log};
  %       \addplot table
  %       [x=epoch, y=val_loss, col sep=comma, mark = none] {Figures/Data/adam.log};
        
  %       \addlegendentry{\footnotesize{ADAGRAD}}
  %       \addlegendentry{\footnotesize{ADADELTA}}
  %       \addlegendentry{\footnotesize{ADAM}}
  %       \addlegendentry{SGD$_{0.01}$}
        
  %     \end{axis}
  %   \end{tikzpicture}
  %   \caption{Performance metrics during training}
  %   \vspace{.25cm}
  % \end{subfigure}
  \begin{subfigure}[b]{1.0\linewidth}
    \begin{tabu} to \textwidth {@{}l*5{X[c]}@{}}
      \Tstrut \Bstrut &\textsc{AdaGrad}& \textsc{AdaDelta}&
      \textsc{Adam} & \textsc{Sgd} & Momentum \\
      \hline           
      \Tstrut  Accuracy &0.9870 & 0.9562 & 0.9925 & 0.9866 & 0.9923 \\
      \Tstrut  Loss &0.0404 & 0.1447 & 0.0999 & 0.0403 & 0.0246 \\     
    \end{tabu}
    % \begin{tabu} to \textwidth {@{}  *3{X[c]}c*3{X[c]} @{}} 
    %   \multicolumn{3}{c}{Classification Accuracy}
    %   &~&\multicolumn{3}{c}{Error Measure}
    %   \\\cline{1-3}\cline{5-7}
    %   \textsc{AdaGad}&\textsc{AdaDelta}&\textsc{Adam}&&\textsc{AdaGrad}&\textsc{AdaDelta}&\textsc{Adam}
    %   \\\cline{1-3}\cline{5-7}
    %   1&1&1&&1&1&1
    % \end{tabu}
    \caption{Performace metrics after 50 epochs}
  \end{subfigure}
  \caption[Performance Comparison of Training Algorithms]{
    Average performance metrics of the neural network given in
   Figure~\ref{fig:mnist_architecture} trained 5 times for 50 epochs
   using different optimization algorithms.}
  \label{fig:comp_alg}
\end{figure}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../main"
%%% End:
