ArmNN
 22.08
TfliteExecutor.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
7 #include "IExecutor.hpp"
11 #include "armnn/utility/Timer.hpp"
12 
13 #include <armnn_delegate.hpp>
14 #include <DelegateOptions.hpp>
15 
16 #include <tensorflow/lite/c/common.h>
17 #include <tensorflow/lite/interpreter.h>
18 #include <tensorflow/lite/kernels/register.h>
19 
20 using namespace tflite;
21 class TfLiteExecutor : public IExecutor
22 {
23 public:
24  TfLiteExecutor(const ExecuteNetworkParams& m_Params);
25 
26  std::vector<const void*> Execute() override;
27  void PrintNetworkInfo() override{};
28  void CompareAndPrintResult(std::vector<const void*> otherOutput) override;
29 
30 private:
31  std::unique_ptr<tflite::FlatBufferModel> m_Model;
32  const ExecuteNetworkParams& m_Params;
33  std::unique_ptr<Interpreter> m_TfLiteInterpreter;
34 };
35 
Holds all parameters necessary to execute a network Check ExecuteNetworkProgramOptions.cpp for a description of each parameter.
void PrintNetworkInfo() override
Print available information about the network.
IExecutor executes a network.
Definition: IExecutor.hpp:10