[−][src]Type Definition tract_hir::infer::InferenceModel
type InferenceModel = Graph<InferenceFact, Box<dyn InferenceOp>>;
A model with partially types and shapes, as produced by parsing ONNX or Tensorflow graphs.
Trait Implementations
impl InferenceModelExt for InferenceModel
[src]
pub fn analyse(&mut self, obstinate: bool) -> TractResult<bool>
[src]
Analyse all nodes of the graph.
Will stop on first error unless obstinate
is true
.
pub fn incorporate(self) -> TractResult<InferenceModel>
[src]
Perform early transformation before going typed.
pub fn missing_type_shape(&self) -> TractResult<Vec<OutletId>>
[src]
List OutletId with incomplete type information.
Will stop on first error unless obstinate
is true
.
pub fn eliminate_dead_branches(self) -> TractResult<InferenceModel>
[src]
Eliminate seemingly dead branches of the graph.
This may break stateful networks.
pub fn into_typed(self) -> TractResult<TypedModel>
[src]
Attempt full analyse and conversion to TypedModel.
pub fn into_optimized(self) -> TractResult<TypedModel>
[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.
impl SpecialOps<InferenceFact, Box<dyn InferenceOp + 'static, Global>> for InferenceModel
[src]
pub fn is_source(op: &Box<dyn InferenceOp>) -> bool
[src]
pub fn create_dummy(&self) -> Box<dyn InferenceOp>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn create_source(&self, _fact: InferenceFact) -> Box<dyn InferenceOp>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
[src]
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<I, A> Iterator for Box<I, A> where
I: Iterator + ?Sized,
A: Allocator, type Item = <I as Iterator>::Item;impl<F, A> Future for Box<F, A> where
F: Unpin + Future + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;
pub fn wire_node(
&mut self,
name: impl Into<String>,
op: impl Into<Box<dyn InferenceOp>>,
inputs: &[OutletId]
) -> TractResult<TVec<OutletId>>
[src]
&mut self,
name: impl Into<String>,
op: impl Into<Box<dyn InferenceOp>>,
inputs: &[OutletId]
) -> TractResult<TVec<OutletId>>