native_neural_network 0.1.6

Lib no_std Rust for native neural network (.rnn)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::scratch::Scratch;
use crate::rnn_format::{parse_rnn_from_bytes, RnnHandle, Error as RnnError};

pub fn get_network_from_rnn<'bytes, 'scratch>(
    bytes: &'bytes [u8],
    scratch: &'scratch mut Scratch<'_>,
) -> Result<RnnHandle<'bytes, 'scratch>, RnnError> {
    parse_rnn_from_bytes(bytes, scratch)
}

use crate::visualization::view::NetworkView;
use crate::visualization::errors::VisualizeError;

pub fn get_network_view<'a>(bytes: &'a [u8]) -> Result<NetworkView<'a>, VisualizeError> {
    NetworkView::from_rnn_bytes(bytes)
}