\hypertarget{classnntrainer_1_1DirDataProducer}{}\doxysection{nntrainer\+::Dir\+Data\+Producer Class Reference}
\label{classnntrainer_1_1DirDataProducer}\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}


\mbox{\hyperlink{classnntrainer_1_1DirDataProducer}{Dir\+Data\+Producer}} which generates a onehot vector as a label.  




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



Inheritance diagram for nntrainer\+::Dir\+Data\+Producer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=227pt]{classnntrainer_1_1DirDataProducer__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::Dir\+Data\+Producer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=227pt]{classnntrainer_1_1DirDataProducer__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1DirDataProducer_a1b995d12abb7ecb428eedac26b0fc841}{Dir\+Data\+Producer}} ()
\begin{DoxyCompactList}\small\item\em Construct a new Dir Data Producer object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1DirDataProducer_ab92873f9957f4f01f0a0fd174d1723bb}{Dir\+Data\+Producer}} (const std\+::string \&dir\+\_\+path)
\begin{DoxyCompactList}\small\item\em Construct a new Dir Data Producer object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{classnntrainer_1_1DirDataProducer_a30821205de71d2a387c7a816db270c77}{$\sim$\+Dir\+Data\+Producer}} ()
\begin{DoxyCompactList}\small\item\em Destroy the Dir Data Producer object. \end{DoxyCompactList}\item 
const std\+::string \mbox{\hyperlink{classnntrainer_1_1DirDataProducer_ae8b1a0a62184a1bc0e531a2b269d3a3a}{get\+Type}} () const override
\begin{DoxyCompactList}\small\item\em Get the producer type. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{classnntrainer_1_1DirDataProducer_a87527ec9a3698e3dadbb3f94b7660d91}{is\+Multi\+Thread\+Safe}} () const override
\begin{DoxyCompactList}\small\item\em denote if given producer is thread safe and can be parallelized. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classnntrainer_1_1DirDataProducer_ac8f864e742f6a447cc0455dcdfb18ac0}{set\+Property}} (const std\+::vector$<$ std\+::string $>$ \&properties) override
\item 
\mbox{\hyperlink{classnntrainer_1_1DataProducer_a68a584a2abd402afb289fb79dc79426f}{Data\+Producer\+::\+Generator}} \mbox{\hyperlink{classnntrainer_1_1DirDataProducer_af83efcbbc49c0614714c8cb11f589bd2}{finalize}} (const std\+::vector$<$ Tensor\+Dim $>$ \&input\+\_\+dims, const std\+::vector$<$ Tensor\+Dim $>$ \&label\+\_\+dims, void $\ast$user\+\_\+data=nullptr) override
\item 
unsigned int \mbox{\hyperlink{classnntrainer_1_1DirDataProducer_ade22374c3f052ee3bdf2863663949196}{size}} (const std\+::vector$<$ Tensor\+Dim $>$ \&input\+\_\+dims, const std\+::vector$<$ Tensor\+Dim $>$ \&label\+\_\+dims) const override
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_a6bc09e9304f41b9eeda61aa2dc0c839d}\label{classnntrainer_1_1DirDataProducer_a6bc09e9304f41b9eeda61aa2dc0c839d}} 
static const std\+::string {\bfseries type} = \char`\"{}dir\char`\"{}
\end{DoxyCompactItemize}
\doxysubsection*{Additional Inherited Members}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classnntrainer_1_1DirDataProducer}{Dir\+Data\+Producer}} which generates a onehot vector as a label. 



Definition at line 34 of file dir\+\_\+data\+\_\+producers.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_a1b995d12abb7ecb428eedac26b0fc841}\label{classnntrainer_1_1DirDataProducer_a1b995d12abb7ecb428eedac26b0fc841}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!DirDataProducer@{DirDataProducer}}
\index{DirDataProducer@{DirDataProducer}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{DirDataProducer()}{DirDataProducer()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily nntrainer\+::\+Dir\+Data\+Producer\+::\+Dir\+Data\+Producer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Construct a new Dir Data Producer object. 



Definition at line 77 of file dir\+\_\+data\+\_\+producers.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_ab92873f9957f4f01f0a0fd174d1723bb}\label{classnntrainer_1_1DirDataProducer_ab92873f9957f4f01f0a0fd174d1723bb}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!DirDataProducer@{DirDataProducer}}
\index{DirDataProducer@{DirDataProducer}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{DirDataProducer()}{DirDataProducer()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily nntrainer\+::\+Dir\+Data\+Producer\+::\+Dir\+Data\+Producer (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{dir\+\_\+path }\end{DoxyParamCaption})}



Construct a new Dir Data Producer object. 



Definition at line 82 of file dir\+\_\+data\+\_\+producers.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_a30821205de71d2a387c7a816db270c77}\label{classnntrainer_1_1DirDataProducer_a30821205de71d2a387c7a816db270c77}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!````~DirDataProducer@{$\sim$DirDataProducer}}
\index{````~DirDataProducer@{$\sim$DirDataProducer}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{$\sim$DirDataProducer()}{~DirDataProducer()}}
{\footnotesize\ttfamily nntrainer\+::\+Dir\+Data\+Producer\+::$\sim$\+Dir\+Data\+Producer (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destroy the Dir Data Producer object. 



Definition at line 87 of file dir\+\_\+data\+\_\+producers.\+cpp.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_af83efcbbc49c0614714c8cb11f589bd2}\label{classnntrainer_1_1DirDataProducer_af83efcbbc49c0614714c8cb11f589bd2}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!finalize@{finalize}}
\index{finalize@{finalize}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{finalize()}{finalize()}}
{\footnotesize\ttfamily \mbox{\hyperlink{classnntrainer_1_1DataProducer_a68a584a2abd402afb289fb79dc79426f}{Data\+Producer\+::\+Generator}} nntrainer\+::\+Dir\+Data\+Producer\+::finalize (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ Tensor\+Dim $>$ \&}]{input\+\_\+dims,  }\item[{const std\+::vector$<$ Tensor\+Dim $>$ \&}]{label\+\_\+dims,  }\item[{void $\ast$}]{user\+\_\+data = {\ttfamily nullptr} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}





\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000028}{Todo}}]expand this to non onehot case \end{DoxyRefDesc}


Reimplemented from \mbox{\hyperlink{classnntrainer_1_1DataProducer_aa6443d25036ccb3e85b284ca51022291}{nntrainer\+::\+Data\+Producer}}.



Definition at line 105 of file dir\+\_\+data\+\_\+producers.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_ae8b1a0a62184a1bc0e531a2b269d3a3a}\label{classnntrainer_1_1DirDataProducer_ae8b1a0a62184a1bc0e531a2b269d3a3a}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!getType@{getType}}
\index{getType@{getType}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{getType()}{getType()}}
{\footnotesize\ttfamily const std\+::string nntrainer\+::\+Dir\+Data\+Producer\+::get\+Type (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Get the producer type. 

\begin{DoxyReturn}{Returns}
const std\+::string type representation 
\end{DoxyReturn}


Implements \mbox{\hyperlink{classnntrainer_1_1DataProducer_aa3f081fc338b4dbf18c6639a1b12daeb}{nntrainer\+::\+Data\+Producer}}.



Definition at line 89 of file dir\+\_\+data\+\_\+producers.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_a87527ec9a3698e3dadbb3f94b7660d91}\label{classnntrainer_1_1DirDataProducer_a87527ec9a3698e3dadbb3f94b7660d91}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!isMultiThreadSafe@{isMultiThreadSafe}}
\index{isMultiThreadSafe@{isMultiThreadSafe}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{isMultiThreadSafe()}{isMultiThreadSafe()}}
{\footnotesize\ttfamily bool nntrainer\+::\+Dir\+Data\+Producer\+::is\+Multi\+Thread\+Safe (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



denote if given producer is thread safe and can be parallelized. 

\begin{DoxyNote}{Note}
if \mbox{\hyperlink{classnntrainer_1_1DirDataProducer_ade22374c3f052ee3bdf2863663949196}{size()}} == S\+I\+Z\+E\+\_\+\+U\+N\+D\+E\+F\+I\+E\+ND, thread safe shall be false
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
bool true if thread safe. 
\end{DoxyReturn}
\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000027}{Todo}}]make this true, it is needed to test multiple worker scenario \end{DoxyRefDesc}


Reimplemented from \mbox{\hyperlink{classnntrainer_1_1DataProducer_a5411b64f5ff26d50a13638a0e5f53a29}{nntrainer\+::\+Data\+Producer}}.



Definition at line 93 of file dir\+\_\+data\+\_\+producers.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_ac8f864e742f6a447cc0455dcdfb18ac0}\label{classnntrainer_1_1DirDataProducer_ac8f864e742f6a447cc0455dcdfb18ac0}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!setProperty@{setProperty}}
\index{setProperty@{setProperty}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{setProperty()}{setProperty()}}
{\footnotesize\ttfamily void nntrainer\+::\+Dir\+Data\+Producer\+::set\+Property (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ std\+::string $>$ \&}]{properties }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}







Reimplemented from \mbox{\hyperlink{classnntrainer_1_1DataProducer_adec84ff25c17552145cc8b3af842749d}{nntrainer\+::\+Data\+Producer}}.



Definition at line 98 of file dir\+\_\+data\+\_\+producers.\+cpp.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classnntrainer_1_1DirDataProducer_ac8f864e742f6a447cc0455dcdfb18ac0_cgraph}
\end{center}
\end{figure}
\mbox{\Hypertarget{classnntrainer_1_1DirDataProducer_ade22374c3f052ee3bdf2863663949196}\label{classnntrainer_1_1DirDataProducer_ade22374c3f052ee3bdf2863663949196}} 
\index{nntrainer::DirDataProducer@{nntrainer::DirDataProducer}!size@{size}}
\index{size@{size}!nntrainer::DirDataProducer@{nntrainer::DirDataProducer}}
\doxysubsubsection{\texorpdfstring{size()}{size()}}
{\footnotesize\ttfamily unsigned int nntrainer\+::\+Dir\+Data\+Producer\+::size (\begin{DoxyParamCaption}\item[{const std\+::vector$<$ Tensor\+Dim $>$ \&}]{input\+\_\+dims,  }\item[{const std\+::vector$<$ Tensor\+Dim $>$ \&}]{label\+\_\+dims }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}







Reimplemented from \mbox{\hyperlink{classnntrainer_1_1DataProducer_aeab0bfee2f7d741e7317716fcf43f00b}{nntrainer\+::\+Data\+Producer}}.



Definition at line 169 of file dir\+\_\+data\+\_\+producers.\+cpp.



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