pub struct TypedSource {
pub fact: TypedFact,
}Fields§
§fact: TypedFactImplementations§
Trait Implementations§
Source§impl Clone for TypedSource
impl Clone for TypedSource
Source§fn clone(&self) -> TypedSource
fn clone(&self) -> TypedSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypedSource
impl Debug for TypedSource
Source§impl EvalOp for TypedSource
impl EvalOp for TypedSource
fn is_stateless(&self) -> bool
fn state( &self, _session: &mut SessionState, node_id: usize, ) -> TractResult<Option<Box<dyn OpState>>>
fn eval(&self, inputs: TVec<TValue>) -> TractResult<TVec<TValue>>
fn eval_with_session( &self, node_id: usize, session: &SessionState, inputs: TVec<TValue>, ) -> TractResult<TVec<TValue>>
Source§impl Hash for TypedSource
impl Hash for TypedSource
Source§impl Op for TypedSource
impl Op for TypedSource
fn name(&self) -> StaticName
fn as_typed(&self) -> Option<&dyn TypedOp>
Source§fn validation(&self) -> Validation
fn validation(&self) -> Validation
The kind of accuracy check that should be performed on operation when
testing them.
Source§impl TypedOp for TypedSource
impl TypedOp for TypedSource
Source§fn output_facts(&self, _inputs: &[&TypedFact]) -> TractResult<TVec<TypedFact>>
fn output_facts(&self, _inputs: &[&TypedFact]) -> TractResult<TVec<TypedFact>>
Deduce output facts from input facts.
fn change_axes( &self, model: &TypedModel, node: &TypedNode, _io: InOut, change: &AxisOp, ) -> TractResult<Option<AxisChangeConsequence>>
Source§fn concretize_dims(
&self,
_source: &TypedModel,
node: &TypedNode,
target: &mut TypedModel,
_mapping: &HashMap<OutletId, OutletId>,
values: &SymbolValues,
) -> TractResult<TVec<OutletId>>
fn concretize_dims( &self, _source: &TypedModel, node: &TypedNode, target: &mut TypedModel, _mapping: &HashMap<OutletId, OutletId>, values: &SymbolValues, ) -> TractResult<TVec<OutletId>>
Transform the op into by providing a value to one or more symbols.
fn axes_mapping( &self, inputs: &[&TypedFact], outputs: &[&TypedFact], ) -> TractResult<AxesMapping>
Source§fn fuse(
&self,
_model: &TypedModel,
_node: &TypedNode,
) -> TractResult<Option<TypedModelPatch>>
fn fuse( &self, _model: &TypedModel, _node: &TypedNode, ) -> TractResult<Option<TypedModelPatch>>
Fuse op after codegen to deal with local optimisations.
Source§fn declutter_with_session(
&self,
session: &mut OptimizerSession<'_>,
model: &TypedModel,
node: &TypedNode,
) -> TractResult<Option<TypedModelPatch>>
fn declutter_with_session( &self, session: &mut OptimizerSession<'_>, model: &TypedModel, node: &TypedNode, ) -> TractResult<Option<TypedModelPatch>>
Declutter the op to the tract_core operator set as much as possible.
Source§fn declutter(
&self,
model: &TypedModel,
node: &TypedNode,
) -> TractResult<Option<TypedModelPatch>>
fn declutter( &self, model: &TypedModel, node: &TypedNode, ) -> TractResult<Option<TypedModelPatch>>
Declutter the op to the tract_core operator set as much as possible.
Source§fn cost(&self, _inputs: &[&TypedFact]) -> TractResult<TVec<(Cost, TDim)>>
fn cost(&self, _inputs: &[&TypedFact]) -> TractResult<TVec<(Cost, TDim)>>
Computes a cost hint of the operation. Read more
fn suggested_axis_changes(&self) -> TractResult<TVec<(InOut, AxisOp)>>
fn slice( &self, patch: &mut TypedModelPatch, model: &TypedModel, node: &TypedNode, prefix: &str, inputs: &[OutletId], output_axis: usize, start: &TDim, end: &TDim, ) -> TractResult<Option<TVec<OutletId>>>
Source§fn quantize(
&self,
model: &TypedModel,
node: &TypedNode,
dt: DatumType,
scale: f32,
zero_point: i32,
) -> TractResult<Option<Box<dyn TypedOp>>>
fn quantize( &self, model: &TypedModel, node: &TypedNode, dt: DatumType, scale: f32, zero_point: i32, ) -> TractResult<Option<Box<dyn TypedOp>>>
Transforms the op in an equivalent one, operating on dt (i8 or u8). Read more
Source§fn codegen(
&self,
model: &TypedModel,
node: &TypedNode,
) -> TractResult<Option<TypedModelPatch>>
fn codegen( &self, model: &TypedModel, node: &TypedNode, ) -> TractResult<Option<TypedModelPatch>>
Translate the op into the most efficient form possible for execution. Read more
Source§fn nested_model_multipliers(
&self,
inputs: &[&TypedFact],
) -> Vec<(StaticName, TDim)>
fn nested_model_multipliers( &self, inputs: &[&TypedFact], ) -> Vec<(StaticName, TDim)>
Nested model multipliers, with label (for profiling).
Auto Trait Implementations§
impl Freeze for TypedSource
impl !RefUnwindSafe for TypedSource
impl Send for TypedSource
impl Sync for TypedSource
impl Unpin for TypedSource
impl !UnwindSafe for TypedSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more