[−][src]Trait tract_tensorflow::prelude::InferenceModelExt
Required methods
fn analyse(&mut self, obstinate: bool) -> Result<bool, TractError>
Analyse all nodes of the graph.
Will stop on first error unless obstinate
is true
.
fn incorporate(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Perform early transformation before going typed.
fn missing_type_shape(&self) -> Result<Vec<OutletId>, TractError>
List OutletId with incomplete type information.
Will stop on first error unless obstinate
is true
.
fn eliminate_dead_branches(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Eliminate seemingly dead branches of the graph.
This may break stateful networks.
fn into_typed(
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
Attempt full analyse and conversion to TypedModel.
fn into_optimized(
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
Attempt full analyse, decluttering and mapping to optimized operations.
This will work even if the network can not be normalized.
Implementors
impl InferenceModelExt for Graph<InferenceFact, Box<dyn InferenceOp + 'static>>
[src]
fn analyse(&mut self, obstinate: bool) -> Result<bool, TractError>
[src]
Analyse all nodes of the graph.
Will stop on first error unless obstinate
is true
.
fn incorporate(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
[src]
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Perform early transformation before going typed.
fn missing_type_shape(&self) -> Result<Vec<OutletId>, TractError>
[src]
List OutletId with incomplete type information.
Will stop on first error unless obstinate
is true
.
fn eliminate_dead_branches(
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
[src]
self
) -> Result<Graph<InferenceFact, Box<dyn InferenceOp + 'static>>, TractError>
Eliminate seemingly dead branches of the graph.
This may break stateful networks.
fn into_typed(
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
[src]
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
Attempt full analyse and conversion to TypedModel.
fn into_optimized(
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
[src]
self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static>>, TractError>
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.