\hypertarget{classnntrainer_1_1RecurrentRealizer}{}\doxysection{nntrainer\+::Recurrent\+Realizer Class Reference}
\label{classnntrainer_1_1RecurrentRealizer}\index{nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}}


Recurrent Realizer which unrolls graph from given graph representation.  




{\ttfamily \#include $<$recurrent\+\_\+realizer.\+h$>$}



Inheritance diagram for nntrainer\+::Recurrent\+Realizer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=234pt]{classnntrainer_1_1RecurrentRealizer__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::Recurrent\+Realizer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=234pt]{classnntrainer_1_1RecurrentRealizer__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1RecurrentRealizer_a30882ff2bf2ed38f4f481c93fd2b457e}{Recurrent\+Realizer}} (const std\+::vector$<$ std\+::string $>$ \&properties, const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&input\+\_\+conns, const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&end\+\_\+conns)
\begin{DoxyCompactList}\small\item\em Construct a new Recurrent Realizer object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1RecurrentRealizer_ad2faaf81c0aa8afeb9035a50d70f7830}{Recurrent\+Realizer}} (const char $\ast$ini, const std\+::vector$<$ std\+::string $>$ \&external\+\_\+input\+\_\+layers)
\begin{DoxyCompactList}\small\item\em Construct a new Recurrent Realizer object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1RecurrentRealizer_ad95f379d1609acbc224b5f47b68547b1}{$\sim$\+Recurrent\+Realizer}} ()
\begin{DoxyCompactList}\small\item\em Destroy the Recurrent Realizer object. \end{DoxyCompactList}\item 
Graph\+Representation \mbox{\hyperlink{classnntrainer_1_1RecurrentRealizer_abc5fe66a0915b122b423c568375ceff0}{realize}} (const Graph\+Representation \&reference) override
\begin{DoxyCompactList}\small\item\em realized graph \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Recurrent Realizer which unrolls graph from given graph representation. 



Definition at line 44 of file recurrent\+\_\+realizer.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1RecurrentRealizer_a30882ff2bf2ed38f4f481c93fd2b457e}\label{classnntrainer_1_1RecurrentRealizer_a30882ff2bf2ed38f4f481c93fd2b457e}} 
\index{nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}!RecurrentRealizer@{RecurrentRealizer}}
\index{RecurrentRealizer@{RecurrentRealizer}!nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}}
\doxysubsubsection{\texorpdfstring{RecurrentRealizer()}{RecurrentRealizer()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nntrainer\+::\+Recurrent\+Realizer\+::\+Recurrent\+Realizer (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ std\+::string $>$ \&}]{properties,  }\item[{const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&}]{input\+\_\+conns,  }\item[{const std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Connection}{Connection}} $>$ \&}]{end\+\_\+conns }\end{DoxyParamCaption})}



Construct a new Recurrent Realizer object. 

\begin{DoxyNote}{Note}
There are three types of input\+\_\+layers in recurrent realizer
\begin{DoxyEnumerate}
\item input\+\_\+layers\+: input layers
\item external\+\_\+input\+\_\+layers\+: input\+\_\+layers being renamed to
\item recurrent\+\_\+input\+: Override it\textquotesingle{}s input layers to recurrent output for the steps, where steps $>$ 0
\end{DoxyEnumerate}
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em properties} & unroll\+\_\+for = $<$int$>$ // define timestep of unrolling return\+\_\+sequences = $<$bool$>$ // return sequences recurrent\+\_\+inputs = $<$vector$<$std\+::string$>$$>$ // start of the loop recurrent\+\_\+ouptuts = $<$vector$<$std\+::string$>$$>$ // end of the loop \\
\hline
{\em input\+\_\+conns} & input conns from outer side \\
\hline
{\em end\+\_\+conns} & end connections (output of the internal graph) \\
\hline
\end{DoxyParams}
build end info. eg) end\+\_\+layers\+: a(0), a(3), b(0) becomes end\+\_\+info\+: \{\{a, 3\}, \{b, 0\}\} end\+\_\+layers\+: a(1), b(3), c(0) becomes end\+\_\+info\+: \{\{a, 1\}, \{b, 3\}, \{c, 0\}\}

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000009}{Todo}}]Deal as sequence as proper connection with identity layer \end{DoxyRefDesc}


Definition at line 115 of file recurrent\+\_\+realizer.\+cpp.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classnntrainer_1_1RecurrentRealizer_a30882ff2bf2ed38f4f481c93fd2b457e_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{classnntrainer_1_1RecurrentRealizer_ad2faaf81c0aa8afeb9035a50d70f7830}\label{classnntrainer_1_1RecurrentRealizer_ad2faaf81c0aa8afeb9035a50d70f7830}} 
\index{nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}!RecurrentRealizer@{RecurrentRealizer}}
\index{RecurrentRealizer@{RecurrentRealizer}!nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}}
\doxysubsubsection{\texorpdfstring{RecurrentRealizer()}{RecurrentRealizer()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nntrainer\+::\+Recurrent\+Realizer\+::\+Recurrent\+Realizer (\begin{DoxyParamCaption}\item[{const char $\ast$}]{ini,  }\item[{const std\+::vector$<$ std\+::string $>$ \&}]{external\+\_\+input\+\_\+layers }\end{DoxyParamCaption})}



Construct a new Recurrent Realizer object. 


\begin{DoxyParams}{Parameters}
{\em ini} & ini to load recurrent properties from \\
\hline
{\em external\+\_\+input\+\_\+layers} & external input layers to map input layers \\
\hline
\end{DoxyParams}
\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000011}{Todo}}]delegate to \mbox{\hyperlink{classnntrainer_1_1RecurrentRealizer}{Recurrent\+Realizer}}( \end{DoxyRefDesc}


N\+Y\+I!

Definition at line 214 of file recurrent\+\_\+realizer.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1RecurrentRealizer_ad95f379d1609acbc224b5f47b68547b1}\label{classnntrainer_1_1RecurrentRealizer_ad95f379d1609acbc224b5f47b68547b1}} 
\index{nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}!````~RecurrentRealizer@{$\sim$RecurrentRealizer}}
\index{````~RecurrentRealizer@{$\sim$RecurrentRealizer}!nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}}
\doxysubsubsection{\texorpdfstring{$\sim$RecurrentRealizer()}{~RecurrentRealizer()}}
{\footnotesize\ttfamily nntrainer\+::\+Recurrent\+Realizer\+::$\sim$\+Recurrent\+Realizer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destroy the Recurrent Realizer object. 



Definition at line 222 of file recurrent\+\_\+realizer.\+cpp.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1RecurrentRealizer_abc5fe66a0915b122b423c568375ceff0}\label{classnntrainer_1_1RecurrentRealizer_abc5fe66a0915b122b423c568375ceff0}} 
\index{nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}!realize@{realize}}
\index{realize@{realize}!nntrainer::RecurrentRealizer@{nntrainer::RecurrentRealizer}}
\doxysubsubsection{\texorpdfstring{realize()}{realize()}}
{\footnotesize\ttfamily Graph\+Representation nntrainer\+::\+Recurrent\+Realizer\+::realize (\begin{DoxyParamCaption}\item[{const Graph\+Representation \&}]{reference }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



realized graph 


\begin{DoxyParams}{Parameters}
{\em reference} & reference to realize graph \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Graph\+Representation realized graph 
\end{DoxyReturn}
empty intended

maps input place holder to given name otherwise scopped to suffix \char`\"{}/0\char`\"{}

\#1744, quick fix, add shared\+\_\+from to every node

Create a single time step. Used inside step2\+\_\+unroll.


\begin{DoxyEnumerate}
\item remap identifiers to \$name/\$idx
\item override first output name to \$name/\$idx -\/ 1
\item set shared\+\_\+from
\item if recurrent layer type set timestep property
\end{DoxyEnumerate}

unroll the graph by calling create\+\_\+step()

case when return sequence is true, concat layer is added to aggregate all the output

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000012}{Todo}}]have axis in concat layer \end{DoxyRefDesc}
\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000013}{Todo}}]this has to be wrapped with identity layer as \#1793 \end{DoxyRefDesc}


create identity layer with output name by either creating concat layer or directly using the connection, the number of inputs connection have is depending on the end\+\_\+conns max.

eg) layer A outputs a, b, c, d

if end\+\_\+layers=A(0),A(2) as\+\_\+sequence=A(0) realizer cannot know there is d so this is ignored. It is okay because user didn\textquotesingle{}t specify to use it anyway

\mbox{[}A\mbox{]} type=identity input\+\_\+layers=A\+\_\+concat\+\_\+0, A(1), A(2)

\begin{DoxyNote}{Note}
below is inefficient way of processing nodes. consider optimize below as needed by calling remap realizer only once
\end{DoxyNote}


Implements \mbox{\hyperlink{classnntrainer_1_1GraphRealizer_a841b81262ea06e58655b512c3a0d05a9}{nntrainer\+::\+Graph\+Realizer}}.



Definition at line 225 of file recurrent\+\_\+realizer.\+cpp.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classnntrainer_1_1RecurrentRealizer_abc5fe66a0915b122b423c568375ceff0_cgraph}
\end{center}
\end{figure}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
compiler/\mbox{\hyperlink{recurrent__realizer_8h}{recurrent\+\_\+realizer.\+h}}\item 
compiler/recurrent\+\_\+realizer.\+cpp\end{DoxyCompactItemize}
