\hypertarget{Mlp_8hpp}{
\section{src/Mlp.hpp File Reference}
\label{Mlp_8hpp}\index{src/Mlp.hpp@{src/Mlp.hpp}}
}


Interface to the MLP computations.  
{\ttfamily \#include \char`\"{}SynapticRandomizer.hpp\char`\"{}}\par
{\ttfamily \#include $<$vector$>$}\par
{\ttfamily \#include $<$cstdlib$>$}\par
{\ttfamily \#include $<$iostream$>$}\par
{\ttfamily \#include $<$random$>$}\par
{\ttfamily \#include $<$string$>$}\par
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classjymlp_1_1Mlp}{jymlp::Mlp}
\end{DoxyCompactItemize}
\subsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
namespace \hyperlink{namespacejymlp_1_1actf}{jymlp::actf}


\begin{DoxyCompactList}\small\item\em As of now, define activation functions as an enum. \item\end{DoxyCompactList}\item 
namespace \hyperlink{namespacejymlp_1_1errt}{jymlp::errt}


\begin{DoxyCompactList}\small\item\em The error function type. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries ActF} \{ {\bfseries Unset} =  0, 
{\bfseries linear} =  1, 
{\bfseries hyptan} =  2, 
{\bfseries logsig} =  3
 \}
\item 
enum {\bfseries ErrT} \{ {\bfseries Unset} =  0, 
{\bfseries q2a2} =  1, 
{\bfseries q2a1} =  2, 
{\bfseries q1a1} =  3
 \}
\item 
enum {\bfseries PrettyPrintStyle} \{ {\bfseries plaintext} =  0, 
{\bfseries latexeq} =  1
 \}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Interface to the MLP computations. Cares not about multi-\/ or single-\/objectivity, or anything else regarding the learning algorithm; just provides objective function values and derivatives for differentiable ones.

Implements simple ASCII-\/text serialization that can be easily parsed or written in Matlab or whatever analysis tool with minimal string manipulations or conversions.

All computations require an external workspace of doubles. This inconvenience provides for a couple of optimizations:

(1) The forward pass can be done only once even if the error and backpropagation phases are done for different formulations. A copy of the workspace must be made before error and gradient evaluation, but the costly sums and sigmoids need not be evaluated twice.

(2) Only one thread-\/wise storage could be used for sequentially evaluating a population of MLPs when the maximum required space is known beforehand. 