microflow 0.1.3

A robust and efficient TinyML inference engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use criterion::{criterion_group, criterion_main, Criterion};
use microflow_macros::model;
use nalgebra::matrix;

#[model("models/sine.tflite")]
struct Sine;

fn sine_model(c: &mut Criterion) {
    let input = matrix![0.5];

    c.bench_function("sine_model", |b| b.iter(|| Sine::predict(input)));
}

criterion_group!(benches, sine_model);
criterion_main!(benches);