\hypertarget{classnntrainer_1_1TfliteInterpreter}{}\doxysection{nntrainer\+::Tflite\+Interpreter Class Reference}
\label{classnntrainer_1_1TfliteInterpreter}\index{nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}}


tflite graph interpreter class  




{\ttfamily \#include $<$tflite\+\_\+interpreter.\+h$>$}



Inheritance diagram for nntrainer\+::Tflite\+Interpreter\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=228pt]{classnntrainer_1_1TfliteInterpreter__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for nntrainer\+::Tflite\+Interpreter\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=228pt]{classnntrainer_1_1TfliteInterpreter__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{classnntrainer_1_1TfliteInterpreter_a9b278a29b549017c1c99292074a58d19}{Tflite\+Interpreter}} (const \mbox{\hyperlink{classnntrainer_1_1AppContext}{App\+Context}} \&app\+\_\+context\+\_\+=\mbox{\hyperlink{classnntrainer_1_1AppContext_a692d7f2657598782884be3b78957ccd3}{App\+Context\+::\+Global}}())
\begin{DoxyCompactList}\small\item\em Construct a new tflite Graph Interpreter object. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{classnntrainer_1_1TfliteInterpreter_a75bc1a91312ba725b8a30c4481542474}{$\sim$\+Tflite\+Interpreter}} ()=default
\begin{DoxyCompactList}\small\item\em Destroy the Tflite Interpreter object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{classnntrainer_1_1TfliteInterpreter_ad6af4f59bfe69011f02785082f9a31f8}{serialize}} (const Graph\+Representation \&representation, const std\+::string \&out) override
\item 
Graph\+Representation \mbox{\hyperlink{classnntrainer_1_1TfliteInterpreter_a42c1416aefec7236458f73188ec7907e}{deserialize}} (const std\+::string \&in) override
\begin{DoxyCompactList}\small\item\em deserialize graph from a stream \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
tflite graph interpreter class 



Definition at line 24 of file tflite\+\_\+interpreter.\+h.



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{classnntrainer_1_1TfliteInterpreter_a9b278a29b549017c1c99292074a58d19}\label{classnntrainer_1_1TfliteInterpreter_a9b278a29b549017c1c99292074a58d19}} 
\index{nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}!TfliteInterpreter@{TfliteInterpreter}}
\index{TfliteInterpreter@{TfliteInterpreter}!nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}}
\doxysubsubsection{\texorpdfstring{TfliteInterpreter()}{TfliteInterpreter()}}
{\footnotesize\ttfamily nntrainer\+::\+Tflite\+Interpreter\+::\+Tflite\+Interpreter (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classnntrainer_1_1AppContext}{App\+Context}} \&}]{app\+\_\+context\+\_\+ = {\ttfamily \mbox{\hyperlink{classnntrainer_1_1AppContext_a692d7f2657598782884be3b78957ccd3}{App\+Context\+::\+Global}}()} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Construct a new tflite Graph Interpreter object. 


\begin{DoxyParams}{Parameters}
{\em app\+\_\+context\+\_\+} & app context to create layers \\
\hline
\end{DoxyParams}


Definition at line 31 of file tflite\+\_\+interpreter.\+h.

\mbox{\Hypertarget{classnntrainer_1_1TfliteInterpreter_a75bc1a91312ba725b8a30c4481542474}\label{classnntrainer_1_1TfliteInterpreter_a75bc1a91312ba725b8a30c4481542474}} 
\index{nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}!````~TfliteInterpreter@{$\sim$TfliteInterpreter}}
\index{````~TfliteInterpreter@{$\sim$TfliteInterpreter}!nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}}
\doxysubsubsection{\texorpdfstring{$\sim$TfliteInterpreter()}{~TfliteInterpreter()}}
{\footnotesize\ttfamily virtual nntrainer\+::\+Tflite\+Interpreter\+::$\sim$\+Tflite\+Interpreter (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}, {\ttfamily [default]}}



Destroy the Tflite Interpreter object. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classnntrainer_1_1TfliteInterpreter_a42c1416aefec7236458f73188ec7907e}\label{classnntrainer_1_1TfliteInterpreter_a42c1416aefec7236458f73188ec7907e}} 
\index{nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}!deserialize@{deserialize}}
\index{deserialize@{deserialize}!nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}}
\doxysubsubsection{\texorpdfstring{deserialize()}{deserialize()}}
{\footnotesize\ttfamily Graph\+Representation nntrainer\+::\+Tflite\+Interpreter\+::deserialize (\begin{DoxyParamCaption}\item[{const std\+::string \&}]{in }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



deserialize graph from a stream 


\begin{DoxyParams}{Parameters}
{\em in} & input file name \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Graph\+Representation graph representation 
\end{DoxyReturn}
======== list of things to consider ======== we need to reconstruct some properties from the shape eg) units are not saved as a property

N\+Y\+I!

Implements \mbox{\hyperlink{classnntrainer_1_1GraphInterpreter_ac2a13529652a7b35f74fbf2f6977db08}{nntrainer\+::\+Graph\+Interpreter}}.



Definition at line 664 of file tflite\+\_\+interpreter.\+cpp.

\mbox{\Hypertarget{classnntrainer_1_1TfliteInterpreter_ad6af4f59bfe69011f02785082f9a31f8}\label{classnntrainer_1_1TfliteInterpreter_ad6af4f59bfe69011f02785082f9a31f8}} 
\index{nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}!serialize@{serialize}}
\index{serialize@{serialize}!nntrainer::TfliteInterpreter@{nntrainer::TfliteInterpreter}}
\doxysubsubsection{\texorpdfstring{serialize()}{serialize()}}
{\footnotesize\ttfamily void nntrainer\+::\+Tflite\+Interpreter\+::serialize (\begin{DoxyParamCaption}\item[{const Graph\+Representation \&}]{representation,  }\item[{const std\+::string \&}]{out }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}





\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000014}{Todo}}]check if graph is finalized \& initialized and ready to serialize. \end{DoxyRefDesc}


0. remove batch normalization layer in Graph\+Representation


\begin{DoxyEnumerate}
\item remove loss layer in Graph\+Representation
\item The graph must have weights, input dims, output dims set
\end{DoxyEnumerate}

build Tf\+Op\+Idx\+Map from op\+Nodes

Implements \mbox{\hyperlink{classnntrainer_1_1GraphInterpreter_a04881010be46c66cbe9f87114ecb60fb}{nntrainer\+::\+Graph\+Interpreter}}.



Definition at line 628 of file tflite\+\_\+interpreter.\+cpp.

Here is the call graph for this function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classnntrainer_1_1TfliteInterpreter_ad6af4f59bfe69011f02785082f9a31f8_cgraph}
\end{center}
\end{figure}


The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
compiler/\mbox{\hyperlink{tflite__interpreter_8h}{tflite\+\_\+interpreter.\+h}}\item 
compiler/\mbox{\hyperlink{tflite__interpreter_8cpp}{tflite\+\_\+interpreter.\+cpp}}\end{DoxyCompactItemize}
