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::buffer::Buffer2D;
use microflow_macros::model;

#[model("models/speech.tflite")]
struct Speech;

fn speech_model(c: &mut Criterion) {
    let input = Buffer2D::from_element(0.5);

    c.bench_function("speech_model", |b| b.iter(|| Speech::predict(input)));
}

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