[][src]Trait tract_tensorflow::prelude::InferenceModelExt

pub trait InferenceModelExt {
    pub fn analyse(&mut self, obstinate: bool) -> Result<bool, Error>;
pub fn incorporate(
        self
    ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>;
pub fn missing_type_shape(&self) -> Result<Vec<OutletId, Global>, Error>;
pub fn eliminate_dead_branches(
        self
    ) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>;
pub fn into_typed(
        self
    ) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>;
pub fn into_optimized(
        self
    ) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>; }

Required methods

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

Analyse all nodes of the graph.

Will stop on first error unless obstinate is true.

pub fn incorporate(
    self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
[src]

Perform early transformation before going typed.

pub fn missing_type_shape(&self) -> Result<Vec<OutletId, Global>, Error>[src]

List OutletId with incomplete type information.

Will stop on first error unless obstinate is true.

pub fn eliminate_dead_branches(
    self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
[src]

Eliminate seemingly dead branches of the graph.

This may break stateful networks.

pub fn into_typed(
    self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>
[src]

Attempt full analyse and conversion to TypedModel.

pub fn into_optimized(
    self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>
[src]

Attempt full analyse, decluttering and mapping to optimized operations.

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

Loading content...

Implementors

impl InferenceModelExt for Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>[src]

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

Analyse all nodes of the graph.

Will stop on first error unless obstinate is true.

pub fn incorporate(
    self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
[src]

Perform early transformation before going typed.

pub fn missing_type_shape(&self) -> Result<Vec<OutletId, Global>, Error>[src]

List OutletId with incomplete type information.

Will stop on first error unless obstinate is true.

pub fn eliminate_dead_branches(
    self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static, Global>>, Error>
[src]

Eliminate seemingly dead branches of the graph.

This may break stateful networks.

pub fn into_typed(
    self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>
[src]

Attempt full analyse and conversion to TypedModel.

pub fn into_optimized(
    self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error>
[src]

Attempt full analyse, decluttering and mapping to optimized operations.

This is meant for "simple" networks, where no special model transformation needs to happen. Aternaltively, use to_typed() and manipulate the TypedModel for more control.

Loading content...