2009-08-09 11:17:39 +02:00
\section { neuralpp::Layer Class Reference}
\label { classneuralpp_ 1_ 1Layer} \index { neuralpp::Layer@{ neuralpp::Layer} }
Class for managing layers of neurons.
{ \tt \# include $ < $ neural++.hpp$ > $ }
\subsection * { Public Member Functions}
\begin { CompactItemize}
\item
2009-08-16 20:57:15 +02:00
{ \bf Layer} (size\_ \- t sz, double($ \ast $ a)(double), double th=0.0)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Constructor. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
{ \bf Layer} (std::vector$ < $ { \bf Neuron} $ > $ \& neurons, double($ \ast $ a)(double), double th=0.0)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Alternative constructor. \item \end { CompactList} \item
2009-08-15 02:59:09 +02:00
{ \bf Neuron} \& { \bf operator[$ \, $ ]} (size\_ \- t i) throw (NetworkIndexOutOfBoundsException)
2009-08-09 11:17:39 +02:00
\begin { CompactList} \small \item \em Redefinition for operator []. \item \end { CompactList} \item
void { \bf link} ({ \bf Layer} \& l)
\begin { CompactList} \small \item \em It links a layer to another. \item \end { CompactList} \item
2009-08-16 20:57:15 +02:00
void { \bf setInput} (std::vector$ < $ double $ > $ v)
\begin { CompactList} \small \item \em Set the input values for the neurons of the layer (just use it for the input layer). \item \end { CompactList} \item
2009-08-09 11:17:39 +02:00
void { \bf propagate} ()
\begin { CompactList} \small \item \em It propagates its activation values to the output layers. \item \end { CompactList} \item
2009-08-15 02:59:09 +02:00
size\_ \- t { \bf size} () const
2009-08-09 11:17:39 +02:00
\end { CompactItemize}
\subsection * { Private Attributes}
\begin { CompactItemize}
\item
2009-08-16 20:57:15 +02:00
std::vector$ < $ { \bf Neuron} $ > $ { \bf elements}
\item
double { \bf threshold}
2009-08-09 11:17:39 +02:00
\item
void($ \ast $ { \bf update\_ \- weights} )()
\item
double($ \ast $ { \bf actv\_ \- f} )(double)
\end { CompactItemize}
\subsection { Detailed Description}
Class for managing layers of neurons.
Don't use this class directly unless you know what you're doing, use \doxyref { NeuralNet} { p.} { classneuralpp_ 1_ 1NeuralNet} instead
\subsection { Constructor \& Destructor Documentation}
\index { neuralpp::Layer@{ neuralpp::Layer} !Layer@{ Layer} }
\index { Layer@{ Layer} !neuralpp::Layer@{ neuralpp::Layer} }
2009-08-16 20:57:15 +02:00
\subsubsection [Layer] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Layer::Layer (size\_ \- t { \em sz} , \/ double($ \ast $ )(double) { \em a} , \/ double { \em th} = { \tt 0.0} )} \label { classneuralpp_ 1_ 1Layer_ a235767701b5e9dcf28c5e9e0d04cb0b}
2009-08-09 11:17:39 +02:00
Constructor.
\begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-16 20:57:15 +02:00
\item [{\em sz}] Size of the layer \item [{\em a}] Activation function \item [{\em th}] Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\index { neuralpp::Layer@{ neuralpp::Layer} !Layer@{ Layer} }
\index { Layer@{ Layer} !neuralpp::Layer@{ neuralpp::Layer} }
2009-08-16 20:57:15 +02:00
\subsubsection [Layer] { \setlength { \rightskip } { 0pt plus 5cm} neuralpp::Layer::Layer (std::vector$ < $ { \bf Neuron} $ > $ \& { \em neurons} , \/ double($ \ast $ )(double) { \em a} , \/ double { \em th} = { \tt 0.0} )} \label { classneuralpp_ 1_ 1Layer_ d79f684523f8a6e086b962c8eef37623}
2009-08-09 11:17:39 +02:00
Alternative constructor.
It directly gets a vector of neurons to build the layer \begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-16 20:57:15 +02:00
\item [{\em neurons}] Vector of neurons to be included in the layer \item [{\em a}] Activation function \item [{\em th}] Threshold, value in [0,1] that establishes how much a neuron must be 'sensitive' on variations of the input values \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\subsection { Member Function Documentation}
\index { neuralpp::Layer@{ neuralpp::Layer} !operator[]@{ operator[]} }
\index { operator[]@{ operator[]} !neuralpp::Layer@{ neuralpp::Layer} }
2009-08-16 20:57:15 +02:00
\subsubsection [operator[] ]{ \setlength { \rightskip } { 0pt plus 5cm} { \bf Neuron} \& neuralpp::Layer::operator[$ \, $ ] (size\_ \- t { \em i} ) throw ({ \bf NetworkIndexOutOfBoundsException} )} \label { classneuralpp_ 1_ 1Layer_ 45ff7554830558155c6fbce3b6827122}
2009-08-09 11:17:39 +02:00
Redefinition for operator [].
It gets the neuron at { \em i\/ } \begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em i}] Index of the neuron to get in the layer \end { description}
\end { Desc}
\begin { Desc}
\item [Returns:] Reference to the i-th neuron \end { Desc}
\index { neuralpp::Layer@{ neuralpp::Layer} !link@{ link} }
\index { link@{ link} !neuralpp::Layer@{ neuralpp::Layer} }
\subsubsection [link] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Layer::link ({ \bf Layer} \& { \em l} )} \label { classneuralpp_ 1_ 1Layer_ ac33444fde14633fa1ad4acb024ad150}
It links a layer to another.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em l}] \doxyref { Layer} { p.} { classneuralpp_ 1_ 1Layer} to connect to the current as input layer \end { description}
\end { Desc}
2009-08-16 20:57:15 +02:00
\index { neuralpp::Layer@{ neuralpp::Layer} !setInput@{ setInput} }
\index { setInput@{ setInput} !neuralpp::Layer@{ neuralpp::Layer} }
\subsubsection [setInput] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Layer::setInput (std::vector$ < $ double $ > $ { \em v} )} \label { classneuralpp_ 1_ 1Layer_ 88ceffc23f02a9dc24d4355767b7cca7}
2009-08-09 11:17:39 +02:00
2009-08-16 20:57:15 +02:00
Set the input values for the neurons of the layer (just use it for the input layer).
2009-08-09 11:17:39 +02:00
\begin { Desc}
\item [Parameters:]
\begin { description}
2009-08-16 20:57:15 +02:00
\item [{\em v}] Vector containing the input values \end { description}
2009-08-09 11:17:39 +02:00
\end { Desc}
\index { neuralpp::Layer@{ neuralpp::Layer} !propagate@{ propagate} }
\index { propagate@{ propagate} !neuralpp::Layer@{ neuralpp::Layer} }
\subsubsection [propagate] { \setlength { \rightskip } { 0pt plus 5cm} void neuralpp::Layer::propagate ()} \label { classneuralpp_ 1_ 1Layer_ fcfd306039dbaf91c9e2dcc8fc1f1ce1}
It propagates its activation values to the output layers.
\index { neuralpp::Layer@{ neuralpp::Layer} !size@{ size} }
\index { size@{ size} !neuralpp::Layer@{ neuralpp::Layer} }
2009-08-15 02:59:09 +02:00
\subsubsection [size] { \setlength { \rightskip } { 0pt plus 5cm} size\_ \- t neuralpp::Layer::size () const} \label { classneuralpp_ 1_ 1Layer_ 7ca71ed62fbe9c1e9c0fb6a8dcaf76f0}
2009-08-09 11:17:39 +02:00
\begin { Desc}
\item [Returns:] Number of neurons in the layer \end { Desc}
\subsection { Member Data Documentation}
\index { neuralpp::Layer@{ neuralpp::Layer} !elements@{ elements} }
\index { elements@{ elements} !neuralpp::Layer@{ neuralpp::Layer} }
2009-08-16 20:57:15 +02:00
\subsubsection [elements] { \setlength { \rightskip } { 0pt plus 5cm} std::vector$ < $ { \bf Neuron} $ > $ { \bf neuralpp::Layer::elements} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Layer_ 8188cb5c264e6021cee9979b968a0305}
\index { neuralpp::Layer@{ neuralpp::Layer} !threshold@{ threshold} }
\index { threshold@{ threshold} !neuralpp::Layer@{ neuralpp::Layer} }
\subsubsection [threshold] { \setlength { \rightskip } { 0pt plus 5cm} double { \bf neuralpp::Layer::threshold} \hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Layer_ 02cf4efe1da02a7404d25375c85ed71f}
2009-08-09 11:17:39 +02:00
\index { neuralpp::Layer@{ neuralpp::Layer} !update\_ \- weights@{ update\_ \- weights} }
\index { update\_ \- weights@{ update\_ \- weights} !neuralpp::Layer@{ neuralpp::Layer} }
\subsubsection [update\_\-weights] { \setlength { \rightskip } { 0pt plus 5cm} void($ \ast $ { \bf neuralpp::Layer::update\_ \- weights} )()\hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Layer_ c023a15a16353d0b4f44060a159f550f}
\index { neuralpp::Layer@{ neuralpp::Layer} !actv\_ \- f@{ actv\_ \- f} }
\index { actv\_ \- f@{ actv\_ \- f} !neuralpp::Layer@{ neuralpp::Layer} }
\subsubsection [actv\_\-f] { \setlength { \rightskip } { 0pt plus 5cm} double($ \ast $ { \bf neuralpp::Layer::actv\_ \- f} )(double)\hspace { 0.3cm} { \tt [private]} } \label { classneuralpp_ 1_ 1Layer_ 824367da29f92253a027a7c5b4a4405e}
The documentation for this class was generated from the following file:\begin { CompactItemize}
\item
{ \bf neural++.hpp} \end { CompactItemize}