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