diff --git a/examples/SineExample/SineExample.ino b/examples/SineExample/SineExample.ino index 4342d2a..54e74b7 100644 --- a/examples/SineExample/SineExample.ino +++ b/examples/SineExample/SineExample.ino @@ -1,14 +1,16 @@ #include +// sine_model.h contains the array you exported from the previous step with xxd or tinymlgen #include "sine_model.h" #define NUMBER_OF_INPUTS 1 #define NUMBER_OF_OUTPUTS 1 +// in future projects you may need to tweek this value: it's a trial and error process #define TENSOR_ARENA_SIZE 2*1024 Eloquent::TinyML::TinyML< NUMBER_OF_INPUTS, NUMBER_OF_OUTPUTS, - TENSOR_ARENA_SIZE> ml(sine_model_quantized_tflite); + TENSOR_ARENA_SIZE> ml(sine_model); void setup() { @@ -16,6 +18,7 @@ void setup() { } void loop() { + // pick up a random x and predict its sine float x = 3.14 * random(100) / 100; float y = sin(x); float input[1] = { x }; diff --git a/library.properties b/library.properties index e604422..c48bd44 100644 --- a/library.properties +++ b/library.properties @@ -1,7 +1,7 @@ name=EloquentTinyML version=0.0.1 -author=Simone Salerno -maintainer=Simone Salerno +author=Simone Salerno,eloquentarduino@gmail.com +maintainer=Simone Salerno,eloquentarduino@gmail.com sentence=An eloquent interface to Tensorflow Lite for Microcontrollers paragraph= category=Other