\hypertarget{attention__layer_8cpp}{}\doxysection{layers/attention\+\_\+layer.cpp File Reference}
\label{attention__layer_8cpp}\index{layers/attention\_layer.cpp@{layers/attention\_layer.cpp}}


This is Attention \mbox{\hyperlink{classLayer}{Layer}} Class for Neural Network.  


{\ttfamily \#include $<$attention\+\_\+layer.\+h$>$}\newline
{\ttfamily \#include $<$layer\+\_\+context.\+h$>$}\newline
{\ttfamily \#include $<$nntrainer\+\_\+error.\+h$>$}\newline
{\ttfamily \#include $<$nntrainer\+\_\+log.\+h$>$}\newline
Include dependency graph for attention\+\_\+layer.\+cpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{attention__layer_8cpp__incl}
\end{center}
\end{figure}
\doxysubsection*{Namespaces}
\begin{DoxyCompactItemize}
\item 
 \mbox{\hyperlink{namespacenntrainer}{nntrainer}}
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{namespacenntrainer_a1b8fc8b5c9c2f9a1fd05d5af3ccebebd}{nntrainer\+::\+Attention\+Params}} \{ \newline
{\bfseries query} = 0, 
\mbox{\hyperlink{namespacenntrainer_a41fadbe61bee85682a61d2251b89f8ccaa7b575b9206729df489556c378b86544}{nntrainer\+::value}} = 1, 
{\bfseries key} = 2, 
{\bfseries weights}, 
\newline
{\bfseries query\+\_\+fc\+\_\+weight}, 
{\bfseries query\+\_\+fc\+\_\+bias}, 
{\bfseries key\+\_\+fc\+\_\+weight}, 
{\bfseries key\+\_\+fc\+\_\+bias}, 
\newline
{\bfseries value\+\_\+fc\+\_\+weight}, 
{\bfseries value\+\_\+fc\+\_\+bias}, 
{\bfseries fc\+\_\+weight}, 
{\bfseries fc\+\_\+bias}, 
\newline
{\bfseries projected\+\_\+query}, 
{\bfseries projected\+\_\+key}, 
{\bfseries projected\+\_\+value}, 
\mbox{\hyperlink{namespacenntrainer_a1b8fc8b5c9c2f9a1fd05d5af3ccebebda361a60eafdd8e3874fb871dedf20135e}{nntrainer\+::attention\+\_\+weight}}, 
\newline
{\bfseries dropout\+\_\+mask}, 
{\bfseries attention\+\_\+output}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{namespacenntrainer_ae465178065a4c1f1dfb69da091bf466e}\label{namespacenntrainer_ae465178065a4c1f1dfb69da091bf466e}} 
static constexpr size\+\_\+t {\bfseries nntrainer\+::\+S\+I\+N\+G\+L\+E\+\_\+\+I\+N\+O\+U\+T\+\_\+\+I\+DX} = 0
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is Attention \mbox{\hyperlink{classLayer}{Layer}} Class for Neural Network. 

Copyright (C) 2021 Parichay Kapoor \href{mailto:pk.kapoor@samsung.com}{\texttt{ pk.\+kapoor@samsung.\+com}}

\begin{DoxyDate}{Date}
1 October 2021 
\end{DoxyDate}
\begin{DoxySeeAlso}{See also}
\href{https://github.com/nnstreamer/nntrainer}{\texttt{ https\+://github.\+com/nnstreamer/nntrainer}} 
\end{DoxySeeAlso}
\begin{DoxyAuthor}{Author}
Parichay Kapoor \href{mailto:pk.kapoor@samsung.com}{\texttt{ pk.\+kapoor@samsung.\+com}} 
\end{DoxyAuthor}
\begin{DoxyRefDesc}{Bug}
\item[\mbox{\hyperlink{bug__bug000068}{Bug}}]No known bugs except for N\+YI items \end{DoxyRefDesc}
