Skip to main content

read_embedded_bytes

Function read_embedded_bytes 

Source
pub fn read_embedded_bytes(
    bytes: &[u8],
    onnx: bool,
) -> Result<ModelFiles, ModelConfigError>
Expand description

read_embedded on a model already in memory. onnx says the bytes are an ONNX model, which makes a malformed ModelProto an error instead of “not ONNX”.

§Errors

ModelConfigError::Container when onnx is set and the bytes are not a valid ModelProto.