Trait tract_hir::infer::InferenceModelExt

source ·
pub trait InferenceModelExt {
    // Required methods
    fn analyse(&mut self, obstinate: bool) -> TractResult<bool>;
    fn incorporate(self) -> TractResult<InferenceModel>;
    fn missing_type_shape(&self) -> TractResult<Vec<OutletId>>;
    fn eliminate_dead_branches(self) -> TractResult<InferenceModel>;
    fn into_typed(self) -> TractResult<TypedModel>;
    fn into_optimized(self) -> TractResult<TypedModel>;
}

Required Methods§

source

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

Analyse all nodes of the graph.

Will stop on first error unless obstinate is true.

source

fn incorporate(self) -> TractResult<InferenceModel>

Perform early transformation before going typed.

source

fn missing_type_shape(&self) -> TractResult<Vec<OutletId>>

List OutletId with incomplete type information.

Will stop on first error unless obstinate is true.

source

fn eliminate_dead_branches(self) -> TractResult<InferenceModel>

Eliminate seemingly dead branches of the graph.

This may break stateful networks.

source

fn into_typed(self) -> TractResult<TypedModel>

Attempt full analyse and conversion to TypedModel.

source

fn into_optimized(self) -> TractResult<TypedModel>

Attempt full analyse, decluttering and mapping to optimized operations.

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

Implementors§