📦 Moves NN

This commit is contained in:
Rune Harlyk
2024-08-18 16:47:43 +02:00
committed by Rune Harlyk
parent d33ffc7d95
commit ef4e476b89
2 changed files with 0 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
#ifndef __NeuralNetwork__
#define __NeuralNetwork__
#include "model.h"
#include <stdint.h>
namespace tflite {
template <unsigned int tOpCount>
class MicroMutableOpResolver;
class ErrorReporter;
class Model;
class MicroInterpreter;
} // namespace tflite
struct TfLiteTensor;
class NeuralNetwork {
private:
tflite::MicroMutableOpResolver<10> *resolver;
tflite::ErrorReporter *error_reporter;
tflite::MicroInterpreter *interpreter;
const tflite::Model *model;
uint8_t *tensor_arena;
TfLiteTensor *input;
TfLiteTensor *output;
const int _kArenaSize = 20000;
void setInput(float value);
float predict();
public:
NeuralNetwork(const void *model_data = g_model, const int kArenaSize = 20000);
float predict(float value);
};
#endif