pub trait InferenceModelExt {
// Required methods
fn analyse(&mut self, obstinate: bool) -> Result<bool, Error>;
fn incorporate(
self,
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>;
fn missing_type_shape(&self) -> Result<Vec<OutletId>, Error>;
fn eliminate_dead_branches(
self,
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>;
fn into_typed(self) -> Result<Graph<TypedFact, Box<dyn TypedOp>>, Error>;
fn into_optimized(self) -> Result<Graph<TypedFact, Box<dyn TypedOp>>, 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>>, Error>
fn incorporate( self, ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>
Perform early transformation before going typed.
Sourcefn missing_type_shape(&self) -> Result<Vec<OutletId>, Error>
fn missing_type_shape(&self) -> Result<Vec<OutletId>, 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>>, Error>
fn eliminate_dead_branches( self, ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp>>, Error>
Eliminate seemingly dead branches of the graph.
This may break stateful networks.