Crate cervo_asset
source ·Expand description
To support using NNEF and ONNX interchangeably we have a small wrapping binary format which can contain either type of data, helping keep track of which data is what.
use cervo_asset::{AssetData, AssetKind};
let model_data = load_bytes("model.onnx");
let asset = AssetData::new(AssetKind::Onnx, model_data);
let nnef_asset = asset.to_nnef(None)?; // convert to a symbolic NNEF asset
let inferer = asset.load_basic();
let nnef_inferer = nnef_asset.load_fixed(&[42]);
Structs§
- Contains a tagged buffer of policy data.
Enums§
AssetKind
denotes what kind of policy is contained inside anAssetData
.
Constants§
- Magic used to ensure assets are valid.