[−][src]Struct tract_core::ops::scan::Inference
Fields
body: InferenceModelinput_mapping: Vec<InputMapping<()>>output_mapping: Vec<OutputMapping<(), TDim>>seq_length_input_slot: Option<usize>clean_scan_counts: booliter_count_fact: GenericFact<TDim>Methods
impl Inference[src]
pub fn new(
body: InferenceModel,
input_mapping: Vec<InputMapping<()>>,
output_mapping: Vec<OutputMapping<(), TDim>>,
seq_length_input_slot: Option<usize>,
clean_scan_counts: bool,
iter_count_fact: GenericFact<TDim>
) -> Self[src]
body: InferenceModel,
input_mapping: Vec<InputMapping<()>>,
output_mapping: Vec<OutputMapping<(), TDim>>,
seq_length_input_slot: Option<usize>,
clean_scan_counts: bool,
iter_count_fact: GenericFact<TDim>
) -> Self
Constructs a new Inference.
Trait Implementations
impl StatefullOp for Inference[src]
fn state(
&self,
session: &mut SessionState,
node_id: usize
) -> TractResult<Option<Box<dyn OpState>>>[src]
&self,
session: &mut SessionState,
node_id: usize
) -> TractResult<Option<Box<dyn OpState>>>
fn as_stateless(&self) -> Option<&dyn StatelessOp>[src]
impl Op for Inference[src]
fn name(&self) -> Cow<str>[src]
fn nested_models(&self) -> Vec<(Cow<str>, &dyn Model)>[src]
fn as_typed(&self) -> Option<&dyn TypedOp>[src]
fn as_pulsed(&self) -> Option<&dyn PulsedOp>[src]
fn incorporate(
&self,
_model: &InferenceModel,
_node: &InferenceNode
) -> TractResult<Option<InferenceModelPatch>>[src]
&self,
_model: &InferenceModel,
_node: &InferenceNode
) -> TractResult<Option<InferenceModelPatch>>
fn fuse(
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>[src]
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
fn validation(&self) -> Validation[src]
fn same_as(&self, _other: &dyn Op) -> bool[src]
fn info(&self) -> TractResult<Vec<String>>[src]
fn is_canonic(&self) -> bool[src]
impl InferenceOp for Inference[src]
fn infer_facts(
&mut self,
inputs: TVec<&InferenceFact>,
outputs: TVec<&InferenceFact>,
_observed: TVec<&InferenceFact>
) -> TractResult<(TVec<InferenceFact>, TVec<InferenceFact>, TVec<InferenceFact>)>[src]
&mut self,
inputs: TVec<&InferenceFact>,
outputs: TVec<&InferenceFact>,
_observed: TVec<&InferenceFact>
) -> TractResult<(TVec<InferenceFact>, TVec<InferenceFact>, TVec<InferenceFact>)>
fn to_typed(
&self,
_source: &InferenceModel,
node: &InferenceNode,
target: &mut TypedModel,
mapping: &HashMap<OutletId, OutletId>
) -> TractResult<TVec<OutletId>>[src]
&self,
_source: &InferenceModel,
node: &InferenceNode,
target: &mut TypedModel,
mapping: &HashMap<OutletId, OutletId>
) -> TractResult<TVec<OutletId>>
fn nboutputs(&self) -> TractResult<usize>[src]
fn as_op(&self) -> &dyn Op[src]
fn as_op_mut(&mut self) -> &mut dyn Op[src]
fn infer(
&mut self,
inputs: TVec<&InferenceFact>,
outputs: TVec<&InferenceFact>,
observed: TVec<&InferenceFact>
) -> TractResult<(TVec<InferenceFact>, TVec<InferenceFact>, TVec<InferenceFact>)>[src]
&mut self,
inputs: TVec<&InferenceFact>,
outputs: TVec<&InferenceFact>,
observed: TVec<&InferenceFact>
) -> TractResult<(TVec<InferenceFact>, TVec<InferenceFact>, TVec<InferenceFact>)>
fn observe_outlets(
&self,
_model: &InferenceModel,
_node: &InferenceNode
) -> TractResult<Vec<OutletId>>[src]
&self,
_model: &InferenceModel,
_node: &InferenceNode
) -> TractResult<Vec<OutletId>>
impl Clone for Inference[src]
impl Default for Inference[src]
impl Debug for Inference[src]
Auto Trait Implementations
impl Send for Inference
impl Sync for Inference
impl Unpin for Inference
impl !UnwindSafe for Inference
impl !RefUnwindSafe for Inference
Blanket Implementations
impl<O> StatefullOp for O where
O: StatelessOp + Clone, [src]
O: StatelessOp + Clone,
fn state(
&Self,
&mut SessionState,
usize
) -> Result<Option<Box<dyn OpState + 'static>>, TractError>[src]
&Self,
&mut SessionState,
usize
) -> Result<Option<Box<dyn OpState + 'static>>, TractError>
fn as_stateless(&Self) -> Option<&(dyn StatelessOp + 'static)>[src]
impl<O> InferenceOp for O where
O: InferenceRulesOp + Op, [src]
O: InferenceRulesOp + Op,
fn infer_facts(
&mut Self,
SmallVec<[&InferenceFact; 4]>,
SmallVec<[&InferenceFact; 4]>,
SmallVec<[&InferenceFact; 4]>
) -> Result<(SmallVec<[InferenceFact; 4]>, SmallVec<[InferenceFact; 4]>, SmallVec<[InferenceFact; 4]>), TractError>[src]
&mut Self,
SmallVec<[&InferenceFact; 4]>,
SmallVec<[&InferenceFact; 4]>,
SmallVec<[&InferenceFact; 4]>
) -> Result<(SmallVec<[InferenceFact; 4]>, SmallVec<[InferenceFact; 4]>, SmallVec<[InferenceFact; 4]>), TractError>
fn nboutputs(&Self) -> Result<usize, TractError>[src]
fn observe_outlets(
&Self,
&ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<InferenceFact, Box<dyn InferenceOp + 'static>>
) -> Result<Vec<OutletId>, TractError>[src]
&Self,
&ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<InferenceFact, Box<dyn InferenceOp + 'static>>
) -> Result<Vec<OutletId>, TractError>
fn as_op(&Self) -> &(dyn Op + 'static)[src]
fn as_op_mut(&mut Self) -> &mut (dyn Op + 'static)[src]
fn to_typed(
&Self,
&ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<InferenceFact, Box<dyn InferenceOp + 'static>>,
&mut ModelImpl<TypedFact, Box<dyn TypedOp + 'static>>,
&HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>[src]
&Self,
&ModelImpl<InferenceFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<InferenceFact, Box<dyn InferenceOp + 'static>>,
&mut ModelImpl<TypedFact, Box<dyn TypedOp + 'static>>,
&HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>
fn infer(
&mut self,
inputs: TVec<&InferenceFact>,
outputs: TVec<&InferenceFact>,
observed: TVec<&InferenceFact>
) -> TractResult<(TVec<InferenceFact>, TVec<InferenceFact>, TVec<InferenceFact>)>[src]
&mut self,
inputs: TVec<&InferenceFact>,
outputs: TVec<&InferenceFact>,
observed: TVec<&InferenceFact>
) -> TractResult<(TVec<InferenceFact>, TVec<InferenceFact>, TVec<InferenceFact>)>
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Downcast for T where
T: Any, [src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>[src]
fn as_any(&self) -> &(dyn Any + 'static)[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any, [src]
T: Send + Sync + Any,
impl<T> Clone for T where
T: Clone, [src]
T: Clone,