File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11#include < EloquentTinyML.h>
2+ // sine_model.h contains the array you exported from the previous step with xxd or tinymlgen
23#include " sine_model.h"
34
45#define NUMBER_OF_INPUTS 1
56#define NUMBER_OF_OUTPUTS 1
7+ // in future projects you may need to tweek this value: it's a trial and error process
68#define TENSOR_ARENA_SIZE 2 *1024
79
810Eloquent::TinyML::TinyML<
911 NUMBER_OF_INPUTS,
1012 NUMBER_OF_OUTPUTS,
11- TENSOR_ARENA_SIZE> ml (sine_model_quantized_tflite );
13+ TENSOR_ARENA_SIZE> ml (sine_model );
1214
1315
1416void setup () {
1517 Serial.begin (115200 );
1618}
1719
1820void loop () {
21+ // pick up a random x and predict its sine
1922 float x = 3.14 * random (100 ) / 100 ;
2023 float y = sin (x);
2124 float input[1 ] = { x };
Original file line number Diff line number Diff line change 11name =EloquentTinyML
22version =0.0.1
3- author =Simone Salerno <github .com/eloquentarduino>
4- maintainer =Simone Salerno <github .com/eloquentarduino>
3+ author =Simone Salerno,eloquentarduino@gmail .com
4+ maintainer =Simone Salerno,eloquentarduino@gmail .com
55sentence =An eloquent interface to Tensorflow Lite for Microcontrollers
66paragraph =
77category =Other
You can’t perform that action at this time.
0 commit comments