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§

source

fn analyse(&mut self, obstinate: bool) -> Result<bool, Error>

Analyse all nodes of the graph.

Will stop on first error unless obstinate is true.

source

fn incorporate( self ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp, Global>>, Error>

Perform early transformation before going typed.

source

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.

source

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.

source

fn into_typed(self) -> Result<Graph<TypedFact, Box<dyn TypedOp, Global>>, Error>

Attempt full analyse and conversion to TypedModel.

source

fn into_optimized( self ) -> Result<Graph<TypedFact, Box<dyn TypedOp, Global>>, Error>

Attempt full analyse, decluttering and mapping to optimized operations.

This will work even if the network can not be normalized.

Implementors§