Crate cervo_nnef

Crate cervo_nnef 

Source
Expand description

Contains utilities for using cervo with NNEF.

If you’re going to defer loading NNEF files to runtime, consider running init ahead of time to remove some overhead from the first load call.

§Loading an inference model

use cervo_core::prelude::InfererExt;

let model_data = load_bytes("model.nnef");
let model = cervo_nnef::builder(model_data)
    .build_fixed(&[2])?
    .with_default_epsilon("epsilon");

Structs§

NnefData
A reader for providing NNEF data.

Functions§

builder
Utility function for creating an InfererBuilder for NnefData.
init
Initialize the global NNEF instance.
is_nnef_tar
Utility function to check if a file name is .nnef.tar.