Trait tract_tensorflow::prelude::InferenceModelExt
source · [−]pub trait InferenceModelExt {
fn analyse(&mut self, obstinate: bool) -> Result<bool, Error>;
fn incorporate(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>;
fn missing_type_shape(&self) -> Result<Vec<OutletId, Global>, Error>;
fn eliminate_dead_branches(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>;
fn into_typed(
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>;
fn into_optimized(
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>;
}Required Methods
Analyse all nodes of the graph.
Will stop on first error unless obstinate is true.
fn incorporate(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
fn incorporate(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
Perform early transformation before going typed.
List OutletId with incomplete type information.
Will stop on first error unless obstinate is true.
fn eliminate_dead_branches(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
fn eliminate_dead_branches(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
Eliminate seemingly dead branches of the graph.
This may break stateful networks.
Attempt full analyse and conversion to TypedModel.