\hypertarget{grucell_8cpp}{}\doxysection{layers/grucell.cpp File Reference}
\label{grucell_8cpp}\index{layers/grucell.cpp@{layers/grucell.cpp}}


This is Gated Recurrent Unit Cell \mbox{\hyperlink{classLayer}{Layer}} Class of Neural Network.  


{\ttfamily \#include $<$cmath$>$}\newline
{\ttfamily \#include $<$grucell.\+h$>$}\newline
{\ttfamily \#include $<$lazy\+\_\+tensor.\+h$>$}\newline
{\ttfamily \#include $<$nntrainer\+\_\+error.\+h$>$}\newline
{\ttfamily \#include $<$nntrainer\+\_\+log.\+h$>$}\newline
{\ttfamily \#include $<$node\+\_\+exporter.\+h$>$}\newline
{\ttfamily \#include $<$util\+\_\+func.\+h$>$}\newline
{\ttfamily \#include $<$layer\+\_\+context.\+h$>$}\newline
Include dependency graph for grucell.\+cpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{grucell_8cpp__incl}
\end{center}
\end{figure}
\doxysubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \mbox{\hyperlink{namespacenntrainer}{nntrainer}}
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacenntrainer_a4fe82e10710c32c6d741b4f485c58145}\label{namespacenntrainer_a4fe82e10710c32c6d741b4f485c58145}} 
enum {\bfseries G\+R\+U\+Cell\+Params} \{ \newline
{\bfseries weight\+\_\+ih}, 
{\bfseries weight\+\_\+hh}, 
{\bfseries bias\+\_\+h}, 
{\bfseries bias\+\_\+ih}, 
\newline
{\bfseries bias\+\_\+hh}, 
{\bfseries zrg}, 
{\bfseries dropout\+\_\+mask}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \mbox{\hyperlink{namespacenntrainer_a824cf9c8b75f1c4d7961862a4b78ca5b}{nntrainer\+::grucell\+\_\+forwarding}} (const unsigned int unit, const unsigned int batch\+\_\+size, const bool disable\+\_\+bias, const bool integrate\+\_\+bias, const bool reset\+\_\+after, Acti\+Func \&acti\+\_\+func, Acti\+Func \&recurrent\+\_\+acti\+\_\+func, const Tensor \&input, const Tensor \&prev\+\_\+hidden\+\_\+state, Tensor \&hidden\+\_\+state, const Tensor \&weight\+\_\+ih, const Tensor \&weight\+\_\+hh, const Tensor \&bias\+\_\+h, const Tensor \&bias\+\_\+ih, const Tensor \&bias\+\_\+hh, Tensor \&zrg)
\begin{DoxyCompactList}\small\item\em gru forwarding \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{namespacenntrainer_a694f7ac37596bdfbbd332544d264ba6e}{nntrainer\+::grucell\+\_\+calc\+Gradient}} (const unsigned int unit, const unsigned int batch\+\_\+size, const bool disable\+\_\+bias, const bool integrate\+\_\+bias, const bool reset\+\_\+after, Acti\+Func \&acti\+\_\+func, Acti\+Func \&recurrent\+\_\+acti\+\_\+func, const Tensor \&input, const Tensor \&prev\+\_\+hidden\+\_\+state, Tensor \&d\+\_\+prev\+\_\+hidden\+\_\+state, const Tensor \&d\+\_\+hidden\+\_\+state, Tensor \&d\+\_\+weight\+\_\+ih, const Tensor \&weight\+\_\+hh, Tensor \&d\+\_\+weight\+\_\+hh, Tensor \&d\+\_\+bias\+\_\+h, Tensor \&d\+\_\+bias\+\_\+ih, const Tensor \&bias\+\_\+hh, Tensor \&d\+\_\+bias\+\_\+hh, const Tensor \&zrg, Tensor \&d\+\_\+zrg)
\begin{DoxyCompactList}\small\item\em gru calc\+Gradient \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is Gated Recurrent Unit Cell \mbox{\hyperlink{classLayer}{Layer}} Class of Neural Network. 

Copyright (C) 2021 hyeonseok lee \href{mailto:hs89.lee@samsung.com}{\texttt{ hs89.\+lee@samsung.\+com}}

\begin{DoxyDate}{Date}
28 Oct 2021 
\end{DoxyDate}
\begin{DoxySeeAlso}{See also}
\href{https://github.com/nnstreamer/nntrainer}{\texttt{ https\+://github.\+com/nnstreamer/nntrainer}} 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
hyeonseok lee \href{mailto:hs89.lee@samsung.com}{\texttt{ hs89.\+lee@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000093}{Bug}}]No known bugs except for N\+YI items\end{DoxyRefDesc}


h\+\_\+prev -\/-\/-\/-\/-\/---d1-\/-\/-\/-\/---$>$\mbox{[}$\ast$\mbox{]}-\/-\/-\/-\/---d0-\/-\/---$>$\mbox{[}+\mbox{]}---d0-\/-\/$>$ h d\+\_\+h\+\_\+prev $\vert$ $\vert$ $\vert$ $\vert$ d0 dh $\vert$ d14 $\vert$ d2 d3 $\vert$ $\vert$ $\vert$ +-\/-\/---\mbox{[}1-\/\mbox{]}-\/-\/-\/---$>$\mbox{[}$\ast$\mbox{]} $\vert$ \mbox{[}$\ast$\mbox{]}$<$---+ d15 $\vert$d5 $\vert$ d6 $\vert$ $\vert$ $\vert$reset\+\_\+g$\vert$ update\+\_\+gate $\vert$ memory\+\_\+cell $\vert$ $\vert$ \mbox{[}sig\mbox{]} \mbox{[}sig\mbox{]} \mbox{[}tanh\mbox{]} $\vert$ $\vert$ $\vert$d16 $\vert$ d7 $\vert$d8 $\vert$ $\vert$ \mbox{[}+\mbox{]} \mbox{[}+\mbox{]} \mbox{[}+\mbox{]} $\vert$ $\vert$ / \textbackslash{}d16 $\vert$ \textbackslash{} d7 / \textbackslash{} d8 $\vert$ $\vert$ Whhr Wxhr Whhz Wxhz Whhg Wxhg $\vert$ $\vert$ $\vert$d17 $\vert$d13 $\vert$d12 $\vert$d11 $\vert$d10 $\vert$ d9 +-\/ $\vert$--+-\/-\/-\/---$\vert$---+ $\vert$ $\vert$ $\vert$ +-\/-\/-\/-\/-\/-\/---$\vert$-\/-\/-\/-\/-\/---$\vert$-\/-\/-\/-\/-\/-\/-\/---+ $\vert$ xs-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/---+-\/-\/-\/-\/-\/---+-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/---+ 