\hypertarget{classnntrainer_1_1Iteration}{}\doxysection{nntrainer\+::Iteration Class Reference}
\label{classnntrainer_1_1Iteration}\index{nntrainer::Iteration@{nntrainer::Iteration}}


\mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} class which owns the memory chunk for a single batch.  




{\ttfamily \#include $<$data\+\_\+iteration.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1Iteration_a400c78e280734b57fd159bbdfb599ba8}{Iteration}} (const std\+::vector$<$ ml\+::train\+::\+Tensor\+Dim $>$ \&input\+\_\+dims, const std\+::vector$<$ ml\+::train\+::\+Tensor\+Dim $>$ \&label\+\_\+dims)
\begin{DoxyCompactList}\small\item\em Construct a new \mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} object. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{classnntrainer_1_1Iteration_a0d459cd29bee62693cb49bf7da9d90a0}\label{classnntrainer_1_1Iteration_a0d459cd29bee62693cb49bf7da9d90a0}} 
{\bfseries Iteration} (const \mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} \&rhs)=delete
\item 
\mbox{\Hypertarget{classnntrainer_1_1Iteration_af68459846525fd99b0b885bab48a3eb8}\label{classnntrainer_1_1Iteration_af68459846525fd99b0b885bab48a3eb8}} 
\mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} \& {\bfseries operator=} (const \mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} \&rhs)=delete
\item 
\mbox{\Hypertarget{classnntrainer_1_1Iteration_aa1a4c23406136b62608abc8e2b5774ae}\label{classnntrainer_1_1Iteration_aa1a4c23406136b62608abc8e2b5774ae}} 
{\bfseries Iteration} (\mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} \&\&rhs)=default
\item 
\mbox{\Hypertarget{classnntrainer_1_1Iteration_af21157d5c90e4bdd93325c5a29f9347e}\label{classnntrainer_1_1Iteration_af21157d5c90e4bdd93325c5a29f9347e}} 
\mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} \& {\bfseries operator=} (\mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} \&\&rhs)=default
\item 
unsigned int \mbox{\hyperlink{classnntrainer_1_1Iteration_a76f00b00cca37c79641215250c1b014a}{batch}} ()
\begin{DoxyCompactList}\small\item\em get batch size of iteration \end{DoxyCompactList}\item 
std\+::vector$<$ Tensor $>$ \& \mbox{\hyperlink{classnntrainer_1_1Iteration_a2ce318b5b7adb6d7dd89bc134b3590c6}{get\+Inputs\+Ref}} ()
\begin{DoxyCompactList}\small\item\em Get the Input Reference object. \end{DoxyCompactList}\item 
const std\+::vector$<$ Tensor $>$ \& \mbox{\hyperlink{classnntrainer_1_1Iteration_a52f0cc22e60df161323f0d2058eb0735}{get\+Inputs\+Ref}} () const
\begin{DoxyCompactList}\small\item\em Get the Input Reference object. \end{DoxyCompactList}\item 
std\+::vector$<$ Tensor $>$ \& \mbox{\hyperlink{classnntrainer_1_1Iteration_ab656752c5a768d0becb7e9e35230dd04}{get\+Labels\+Ref}} ()
\begin{DoxyCompactList}\small\item\em Get the Label Reference object. \end{DoxyCompactList}\item 
const std\+::vector$<$ Tensor $>$ \& \mbox{\hyperlink{classnntrainer_1_1Iteration_a4486c07d82e7981850de9800a1fe55a9}{get\+Labels\+Ref}} () const
\begin{DoxyCompactList}\small\item\em Get the Label Reference object. \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} $>$\+::iterator \mbox{\hyperlink{classnntrainer_1_1Iteration_a7e48415fc06f1a82a10ba5978a9c6f05}{begin}} ()
\begin{DoxyCompactList}\small\item\em get sample iterator \mbox{\hyperlink{classnntrainer_1_1Iteration_a7e48415fc06f1a82a10ba5978a9c6f05}{begin()}} \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} $>$\+::iterator \mbox{\hyperlink{classnntrainer_1_1Iteration_ae329d10cc03f2ded032393a42d6e28b6}{end}} ()
\begin{DoxyCompactList}\small\item\em get sample iterator end \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} $>$\+::const\+\_\+iterator \mbox{\hyperlink{classnntrainer_1_1Iteration_a2e795b3fd9939383676d074ca20edc17}{begin}} () const
\begin{DoxyCompactList}\small\item\em get sample iterator begin \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} $>$\+::const\+\_\+iterator \mbox{\hyperlink{classnntrainer_1_1Iteration_aac0a9921a63bed6b2a513ff7e3340782}{end}} () const
\begin{DoxyCompactList}\small\item\em get sample iterator end \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classnntrainer_1_1Iteration_a763236115e81bac1ee79ddc48fbc4bae}{set\+End\+Sample}} (std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} $>$\+::iterator sample\+\_\+iterator)
\begin{DoxyCompactList}\small\item\em set end of the sample which will be used to calculate the batch size \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classnntrainer_1_1Iteration_af3d1fdb52260cadd549c9145478b221b}{set\+End\+Sample}} ()
\begin{DoxyCompactList}\small\item\em Set the End \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} to the original end. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} class which owns the memory chunk for a single batch. 



Definition at line 32 of file data\+\_\+iteration.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1Iteration_a400c78e280734b57fd159bbdfb599ba8}\label{classnntrainer_1_1Iteration_a400c78e280734b57fd159bbdfb599ba8}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!Iteration@{Iteration}}
\index{Iteration@{Iteration}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{Iteration()}{Iteration()}}
{\footnotesize\ttfamily nntrainer\+::\+Iteration\+::\+Iteration (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ ml\+::train\+::\+Tensor\+Dim $>$ \&}]{input\+\_\+dims,  }\item[{const std\+::vector$<$ ml\+::train\+::\+Tensor\+Dim $>$ \&}]{label\+\_\+dims }\end{DoxyParamCaption})}



Construct a new \mbox{\hyperlink{classnntrainer_1_1Iteration}{Iteration}} object. 

\begin{DoxyNote}{Note}
the batch dimension must be the same for all given dimensions and the there must be at least one input
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em input\+\_\+dims} & input dimension \\
\hline
{\em label\+\_\+dims} & label dimension \\
\hline
\end{DoxyParams}


Definition at line 76 of file data\+\_\+iteration.\+cpp.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1Iteration_a76f00b00cca37c79641215250c1b014a}\label{classnntrainer_1_1Iteration_a76f00b00cca37c79641215250c1b014a}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!batch@{batch}}
\index{batch@{batch}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{batch()}{batch()}}
{\footnotesize\ttfamily unsigned int nntrainer\+::\+Iteration\+::batch (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



get batch size of iteration 

\begin{DoxyReturn}{Returns}
unsigned int batch size 
\end{DoxyReturn}


Definition at line 88 of file data\+\_\+iteration.\+cpp.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classnntrainer_1_1Iteration_a76f00b00cca37c79641215250c1b014a_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{classnntrainer_1_1Iteration_a7e48415fc06f1a82a10ba5978a9c6f05}\label{classnntrainer_1_1Iteration_a7e48415fc06f1a82a10ba5978a9c6f05}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!begin@{begin}}
\index{begin@{begin}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{begin()}{begin()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::vector$<$\mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}}$>$\+::iterator nntrainer\+::\+Iteration\+::begin (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



get sample iterator \mbox{\hyperlink{classnntrainer_1_1Iteration_a7e48415fc06f1a82a10ba5978a9c6f05}{begin()}} 

\begin{DoxyReturn}{Returns}
std\+::vector$<$\+Sample$>$\+::iterator 
\end{DoxyReturn}


Definition at line 91 of file data\+\_\+iteration.\+h.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=332pt]{classnntrainer_1_1Iteration_a7e48415fc06f1a82a10ba5978a9c6f05_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{classnntrainer_1_1Iteration_a2e795b3fd9939383676d074ca20edc17}\label{classnntrainer_1_1Iteration_a2e795b3fd9939383676d074ca20edc17}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!begin@{begin}}
\index{begin@{begin}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{begin()}{begin()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily std\+::vector$<$\mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}}$>$\+::const\+\_\+iterator nntrainer\+::\+Iteration\+::begin (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



get sample iterator begin 

\begin{DoxyReturn}{Returns}
std\+::vector$<$\+Sample$>$\+::const\+\_\+iterator 
\end{DoxyReturn}


Definition at line 105 of file data\+\_\+iteration.\+h.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_ae329d10cc03f2ded032393a42d6e28b6}\label{classnntrainer_1_1Iteration_ae329d10cc03f2ded032393a42d6e28b6}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!end@{end}}
\index{end@{end}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{end()}{end()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::vector$<$\mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}}$>$\+::iterator nntrainer\+::\+Iteration\+::end (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



get sample iterator end 

\begin{DoxyReturn}{Returns}
std\+::vector$<$\+Sample$>$\+::iterator 
\end{DoxyReturn}


Definition at line 98 of file data\+\_\+iteration.\+h.

Here is the caller graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classnntrainer_1_1Iteration_ae329d10cc03f2ded032393a42d6e28b6_icgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{classnntrainer_1_1Iteration_aac0a9921a63bed6b2a513ff7e3340782}\label{classnntrainer_1_1Iteration_aac0a9921a63bed6b2a513ff7e3340782}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!end@{end}}
\index{end@{end}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{end()}{end()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily std\+::vector$<$\mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}}$>$\+::const\+\_\+iterator nntrainer\+::\+Iteration\+::end (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



get sample iterator end 

\begin{DoxyReturn}{Returns}
std\+::vector$<$\+Sample$>$\+::const\+\_\+iterator 
\end{DoxyReturn}


Definition at line 112 of file data\+\_\+iteration.\+h.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_a2ce318b5b7adb6d7dd89bc134b3590c6}\label{classnntrainer_1_1Iteration_a2ce318b5b7adb6d7dd89bc134b3590c6}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!getInputsRef@{getInputsRef}}
\index{getInputsRef@{getInputsRef}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{getInputsRef()}{getInputsRef()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::vector$<$Tensor$>$\& nntrainer\+::\+Iteration\+::get\+Inputs\+Ref (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Get the Input Reference object. 

\begin{DoxyReturn}{Returns}
std\+::vector$<$\+Tensor$>$\& input 
\end{DoxyReturn}


Definition at line 63 of file data\+\_\+iteration.\+h.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_a52f0cc22e60df161323f0d2058eb0735}\label{classnntrainer_1_1Iteration_a52f0cc22e60df161323f0d2058eb0735}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!getInputsRef@{getInputsRef}}
\index{getInputsRef@{getInputsRef}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{getInputsRef()}{getInputsRef()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily const std\+::vector$<$Tensor$>$\& nntrainer\+::\+Iteration\+::get\+Inputs\+Ref (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the Input Reference object. 

\begin{DoxyReturn}{Returns}
const std\+::vector$<$\+Tensor$>$\& input 
\end{DoxyReturn}


Definition at line 70 of file data\+\_\+iteration.\+h.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_ab656752c5a768d0becb7e9e35230dd04}\label{classnntrainer_1_1Iteration_ab656752c5a768d0becb7e9e35230dd04}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!getLabelsRef@{getLabelsRef}}
\index{getLabelsRef@{getLabelsRef}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{getLabelsRef()}{getLabelsRef()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily std\+::vector$<$Tensor$>$\& nntrainer\+::\+Iteration\+::get\+Labels\+Ref (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Get the Label Reference object. 

\begin{DoxyReturn}{Returns}
std\+::vector$<$\+Tensor$>$\& label 
\end{DoxyReturn}


Definition at line 77 of file data\+\_\+iteration.\+h.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_a4486c07d82e7981850de9800a1fe55a9}\label{classnntrainer_1_1Iteration_a4486c07d82e7981850de9800a1fe55a9}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!getLabelsRef@{getLabelsRef}}
\index{getLabelsRef@{getLabelsRef}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{getLabelsRef()}{getLabelsRef()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily const std\+::vector$<$Tensor$>$\& nntrainer\+::\+Iteration\+::get\+Labels\+Ref (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Get the Label Reference object. 

\begin{DoxyReturn}{Returns}
const std\+::vector$<$\+Tensor$>$\& label 
\end{DoxyReturn}


Definition at line 84 of file data\+\_\+iteration.\+h.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_af3d1fdb52260cadd549c9145478b221b}\label{classnntrainer_1_1Iteration_af3d1fdb52260cadd549c9145478b221b}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!setEndSample@{setEndSample}}
\index{setEndSample@{setEndSample}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{setEndSample()}{setEndSample()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void nntrainer\+::\+Iteration\+::set\+End\+Sample (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Set the End \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} to the original end. 



Definition at line 94 of file data\+\_\+iteration.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1Iteration_a763236115e81bac1ee79ddc48fbc4bae}\label{classnntrainer_1_1Iteration_a763236115e81bac1ee79ddc48fbc4bae}} 
\index{nntrainer::Iteration@{nntrainer::Iteration}!setEndSample@{setEndSample}}
\index{setEndSample@{setEndSample}!nntrainer::Iteration@{nntrainer::Iteration}}
\doxysubsubsection{\texorpdfstring{setEndSample()}{setEndSample()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void nntrainer\+::\+Iteration\+::set\+End\+Sample (\begin{DoxyParamCaption}\item[{std\+::vector$<$ \mbox{\hyperlink{classnntrainer_1_1Sample}{Sample}} $>$\+::iterator}]{sample\+\_\+iterator }\end{DoxyParamCaption})}



set end of the sample which will be used to calculate the batch size 

\begin{DoxyNote}{Note}
{\itshape iteration} must be non-\/inclusive 
\end{DoxyNote}


Definition at line 90 of file data\+\_\+iteration.\+cpp.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
dataset/\mbox{\hyperlink{data__iteration_8h}{data\+\_\+iteration.\+h}}\item 
dataset/\mbox{\hyperlink{data__iteration_8cpp}{data\+\_\+iteration.\+cpp}}\end{DoxyCompactItemize}
