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 1
1
#include < EloquentTinyML.h>
2
+ // sine_model.h contains the array you exported from the previous step with xxd or tinymlgen
2
3
#include " sine_model.h"
3
4
4
5
#define NUMBER_OF_INPUTS 1
5
6
#define NUMBER_OF_OUTPUTS 1
7
+ // in future projects you may need to tweek this value: it's a trial and error process
6
8
#define TENSOR_ARENA_SIZE 2 *1024
7
9
8
10
Eloquent::TinyML::TinyML<
9
11
NUMBER_OF_INPUTS,
10
12
NUMBER_OF_OUTPUTS,
11
- TENSOR_ARENA_SIZE> ml (sine_model_quantized_tflite );
13
+ TENSOR_ARENA_SIZE> ml (sine_model );
12
14
13
15
14
16
void setup () {
15
17
Serial.begin (115200 );
16
18
}
17
19
18
20
void loop () {
21
+ // pick up a random x and predict its sine
19
22
float x = 3.14 * random (100 ) / 100 ;
20
23
float y = sin (x);
21
24
float input[1 ] = { x };
Original file line number Diff line number Diff line change 1
1
name =EloquentTinyML
2
2
version =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
5
5
sentence =An eloquent interface to Tensorflow Lite for Microcontrollers
6
6
paragraph =
7
7
category =Other
You can’t perform that action at this time.
0 commit comments