[−][src]Trait tract_onnx::prelude::Framework
A Framework that translate its model to tract core model.
The ProtoModel is the parsed representation of the imported model. It does not have to be Protobuf based.
Required methods
fn proto_model_for_read(
&self,
reader: &mut dyn Read
) -> Result<ProtoModel, TractError>
&self,
reader: &mut dyn Read
) -> Result<ProtoModel, TractError>
Parse a proto model from a reader.
fn model_for_proto_model(
&self,
proto: &ProtoModel
) -> Result<ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
&self,
proto: &ProtoModel
) -> Result<ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Translate a proto model into a model.
Provided methods
fn proto_model_for_path(
&self,
p: impl AsRef<Path>
) -> Result<ProtoModel, TractError>
&self,
p: impl AsRef<Path>
) -> Result<ProtoModel, TractError>
Read a proto model from a filename.
fn model_for_read(
&self,
r: &mut dyn Read
) -> Result<ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
&self,
r: &mut dyn Read
) -> Result<ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Read a model from a reader
fn model_for_path(
&self,
p: impl AsRef<Path>
) -> Result<ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
&self,
p: impl AsRef<Path>
) -> Result<ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Build a model from a filename.
Implementors
impl Framework<ModelProto> for Onnx[src]
fn proto_model_for_path(&self, p: impl AsRef<Path>) -> TractResult<ModelProto>[src]
fn proto_model_for_read(&self, r: &mut dyn Read) -> TractResult<ModelProto>[src]
fn model_for_proto_model(
&self,
proto: &ModelProto
) -> TractResult<InferenceModel>[src]
&self,
proto: &ModelProto
) -> TractResult<InferenceModel>