-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtflm_esp32.h
33 lines (28 loc) · 931 Bytes
/
tflm_esp32.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef ELOQUENT_TFLM_ESP32_H
#define ELOQUENT_TFLM_ESP32_H
#define ELOQUENT_TFLM
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
#include "tensorflow/lite/micro/micro_interpreter.h"
#include "tensorflow/lite/micro/system_setup.h"
#include "tensorflow/lite/schema/schema_generated.h"
using tflite::Model;
using tflite::MicroMutableOpResolver;
using tflite::MicroInterpreter;
namespace eloq {
namespace tf {
/**
* Instantiate new interpreter
* @tparam numOps
* @param resolver
* @param model
* @param arena
* @param tensorArenaSize
* @return
*/
template<uint8_t numOps>
MicroInterpreter* newInterpreter(MicroMutableOpResolver<numOps> *resolver, const Model *model, uint8_t* arena, size_t tensorArenaSize) {
return new MicroInterpreter(model, *resolver, arena, tensorArenaSize);
}
}
}
#endif