\hypertarget{classnntrainer_1_1props_1_1Padding1D}{}\doxysection{nntrainer\+::props\+::Padding1D Class Reference}
\label{classnntrainer_1_1props_1_1Padding1D}\index{nntrainer::props::Padding1D@{nntrainer::props::Padding1D}}


\mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D}{Padding1D}} property, this is used to calculate padding2D.  




{\ttfamily \#include $<$common\+\_\+properties.\+h$>$}



Inheritance diagram for nntrainer\+::props\+::Padding1D\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=232pt]{classnntrainer_1_1props_1_1Padding1D__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::props\+::Padding1D\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=232pt]{classnntrainer_1_1props_1_1Padding1D__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
using \mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D_a1018a7447115f36f3b868a978a19d2ae}{prop\+\_\+tag}} = str\+\_\+prop\+\_\+tag
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
bool \mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D_a2a0ab4a6e53e43fcecd26c1256e3c102}{is\+Valid}} (const std\+::string \&v) const override
\item 
std\+::array$<$ unsigned int, 2 $>$ \mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D_ad1bcf7019b961d58e298cf4750a71e05}{compute}} (const Tensor\+Dim \&input, const unsigned int \&kernel, const unsigned int \&stride, const unsigned int \&dilation)
\begin{DoxyCompactList}\small\item\em compute actual padding1d from the underlying data \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Attributes}
\begin{DoxyCompactItemize}
\item 
static constexpr const char $\ast$ \mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D_a967f18265b72646debc89d69d1b81765}{key}} = \char`\"{}padding\char`\"{}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D}{Padding1D}} property, this is used to calculate padding2D. 

\mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D}{Padding1D}} is saved as a string. Upon calling \mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D_ad1bcf7019b961d58e298cf4750a71e05}{Padding1\+D\+::compute}}, returns std\+::vector$<$unsigned int$>$ which has computed padding1\+Ds, below formats are accepted valid
\begin{DoxyEnumerate}
\item \char`\"{}same\char`\"{} (case insensitive literal string)
\item \char`\"{}valid\char`\"{} (case insensitive literal string)
\end{DoxyEnumerate}
\begin{DoxyEnumerate}
\item \char`\"{}causal\char`\"{} (case insensitive literal string)
\item \char`\"{}padding1d\+\_\+all\char`\"{}, eg) padding=1
\item \char`\"{}padding1d\+\_\+left, padding1d\+\_\+right\char`\"{} eg) padding=1,1 
\end{DoxyEnumerate}

Definition at line 441 of file common\+\_\+properties.\+h.



\doxysubsection{Member Typedef Documentation}
\mbox{\Hypertarget{classnntrainer_1_1props_1_1Padding1D_a1018a7447115f36f3b868a978a19d2ae}\label{classnntrainer_1_1props_1_1Padding1D_a1018a7447115f36f3b868a978a19d2ae}} 
\index{nntrainer::props::Padding1D@{nntrainer::props::Padding1D}!prop\_tag@{prop\_tag}}
\index{prop\_tag@{prop\_tag}!nntrainer::props::Padding1D@{nntrainer::props::Padding1D}}
\doxysubsubsection{\texorpdfstring{prop\_tag}{prop\_tag}}
{\footnotesize\ttfamily using \mbox{\hyperlink{classnntrainer_1_1props_1_1Padding1D_a1018a7447115f36f3b868a978a19d2ae}{nntrainer\+::props\+::\+Padding1\+D\+::prop\+\_\+tag}} =  str\+\_\+prop\+\_\+tag}

property type 

Definition at line 451 of file common\+\_\+properties.\+h.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1props_1_1Padding1D_ad1bcf7019b961d58e298cf4750a71e05}\label{classnntrainer_1_1props_1_1Padding1D_ad1bcf7019b961d58e298cf4750a71e05}} 
\index{nntrainer::props::Padding1D@{nntrainer::props::Padding1D}!compute@{compute}}
\index{compute@{compute}!nntrainer::props::Padding1D@{nntrainer::props::Padding1D}}
\doxysubsubsection{\texorpdfstring{compute()}{compute()}}
{\footnotesize\ttfamily std\+::array$<$ unsigned int, 2 $>$ nntrainer\+::props\+::\+Padding1\+D\+::compute (\begin{DoxyParamCaption}\item[{const Tensor\+Dim \&}]{input,  }\item[{const unsigned int \&}]{kernel,  }\item[{const unsigned int \&}]{stride,  }\item[{const unsigned int \&}]{dilation }\end{DoxyParamCaption})}



compute actual padding1d from the underlying data 


\begin{DoxyParams}{Parameters}
{\em input} & input dimension \\
\hline
{\em kernel} & kernel dimension \\
\hline
{\em stride} & stride \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
std\+::array$<$unsigned int, 4$>$ list of unsigned padding 
\end{DoxyReturn}
padding representation

ceil(input / stride)

case 4, 5\+: padding has a sequence of unsigned integer

Definition at line 224 of file common\+\_\+properties.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1props_1_1Padding1D_a2a0ab4a6e53e43fcecd26c1256e3c102}\label{classnntrainer_1_1props_1_1Padding1D_a2a0ab4a6e53e43fcecd26c1256e3c102}} 
\index{nntrainer::props::Padding1D@{nntrainer::props::Padding1D}!isValid@{isValid}}
\index{isValid@{isValid}!nntrainer::props::Padding1D@{nntrainer::props::Padding1D}}
\doxysubsubsection{\texorpdfstring{isValid()}{isValid()}}
{\footnotesize\ttfamily bool nntrainer\+::props\+::\+Padding1\+D\+::is\+Valid (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{v }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}}

case 1, 2, 3\+: padding has string literal

case 4, 5\+: padding has a sequence of unsigned integer

check if every padding is non-\/negative integer

case else\+: false

Definition at line 199 of file common\+\_\+properties.\+cpp.



\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{classnntrainer_1_1props_1_1Padding1D_a967f18265b72646debc89d69d1b81765}\label{classnntrainer_1_1props_1_1Padding1D_a967f18265b72646debc89d69d1b81765}} 
\index{nntrainer::props::Padding1D@{nntrainer::props::Padding1D}!key@{key}}
\index{key@{key}!nntrainer::props::Padding1D@{nntrainer::props::Padding1D}}
\doxysubsubsection{\texorpdfstring{key}{key}}
{\footnotesize\ttfamily constexpr const char$\ast$ nntrainer\+::props\+::\+Padding1\+D\+::key = \char`\"{}padding\char`\"{}\hspace{0.3cm}{\ttfamily [static]}, {\ttfamily [constexpr]}}

unique key to access 

Definition at line 450 of file common\+\_\+properties.\+h.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
layers/\mbox{\hyperlink{common__properties_8h}{common\+\_\+properties.\+h}}\item 
layers/\mbox{\hyperlink{common__properties_8cpp}{common\+\_\+properties.\+cpp}}\end{DoxyCompactItemize}
