tinymind 0.3.2

Neural networks for embedded Rust: a no_std, allocation-free port of the tinymind (C++) library, bit-exact with it
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// The int8 convolution and pooling layers against tinymind (C++)'s over random
// tensors. tests/golden/conv/stdout.txt is the output of
// scripts/cpp/conv_sweep.cpp, which draws the same tensors, biases and
// requantizers from the same generator, in the same order, and runs the C++
// layers; scripts/compare-with-cpp.sh rebuilds it and checks the golden is
// current. See that program for what the shapes and parameters cover. The
// sweep itself is in tests/sweeps/conv.rs, which bench/ also runs on Cortex-M.

#[path = "sweeps/conv.rs"]
mod conv;

#[test]
fn conv_and_pool_match_tinymind_cpp() {
    let mut text = String::new();
    conv::run(&mut text);
    assert_eq!(text, include_str!("golden/conv/stdout.txt"));
}