[−][src]Struct tract_core::ops::cnn::Conv
Fields
data_format: DataFormatkernel_fmt: KernelFormatdilations: Option<TVec<usize>>kernel_shape: Option<TVec<usize>>padding: PaddingSpecstrides: Option<TVec<usize>>group: usizeMethods
impl Conv[src]
pub fn new(
data_format: DataFormat,
kernel_fmt: KernelFormat,
dilations: Option<TVec<usize>>,
kernel_shape: Option<TVec<usize>>,
padding: PaddingSpec,
strides: Option<TVec<usize>>,
group: usize
) -> Self[src]
data_format: DataFormat,
kernel_fmt: KernelFormat,
dilations: Option<TVec<usize>>,
kernel_shape: Option<TVec<usize>>,
padding: PaddingSpec,
strides: Option<TVec<usize>>,
group: usize
) -> Self
Constructs a new Conv.
impl Conv[src]
pub fn output_shape<D: DimLike>(
&self,
ishape: &[D],
kshape: &[usize]
) -> TVec<D>[src]
&self,
ishape: &[D],
kshape: &[usize]
) -> TVec<D>
pub fn to_unary(
&self,
inputs: &[impl Borrow<TypedTensorInfo>]
) -> TractResult<Option<ConvUnary>>[src]
&self,
inputs: &[impl Borrow<TypedTensorInfo>]
) -> TractResult<Option<ConvUnary>>
pub fn add_bias_t<T: FloatLike + AddAssign>(
&self,
conv_result: &mut Tensor,
bias: &Tensor
) -> TractResult<()>[src]
&self,
conv_result: &mut Tensor,
bias: &Tensor
) -> TractResult<()>
Trait Implementations
impl InferenceRulesOp for Conv[src]
fn rules<'r, 'p: 'r, 's: 'r>(
&'s self,
s: &mut Solver<'r>,
inputs: &'p [TensorProxy],
outputs: &'p [TensorProxy]
) -> InferenceResult[src]
&'s self,
s: &mut Solver<'r>,
inputs: &'p [TensorProxy],
outputs: &'p [TensorProxy]
) -> InferenceResult
fn as_op(&self) -> &dyn Op[src]
fn as_op_mut(&mut self) -> &mut dyn Op[src]
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]
impl StatelessOp for Conv[src]
impl Op for Conv[src]
fn name(&self) -> Cow<str>[src]
fn cost(&self, inputs: &[&TypedTensorInfo]) -> TractResult<TVec<(Cost, TDim)>>[src]
fn declutter(
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>[src]
&self,
model: &TypedModel,
node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
fn as_typed(&self) -> Option<&dyn TypedOp>[src]
fn incorporate(
&self,
_model: &InferenceModel,
_node: &InferenceNode
) -> TractResult<Option<InferenceModelPatch>>[src]
&self,
_model: &InferenceModel,
_node: &InferenceNode
) -> TractResult<Option<InferenceModelPatch>>
fn codegen(
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>[src]
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
fn fuse(
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>[src]
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<Option<TypedModelPatch>>
fn nested_models(&self) -> Vec<(Cow<str>, &dyn Model)>[src]
fn validation(&self) -> Validation[src]
fn axes_info(
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<AxesInfo>[src]
&self,
_model: &TypedModel,
_node: &TypedNode
) -> TractResult<AxesInfo>
fn same_as(&self, _other: &dyn Op) -> bool[src]
fn info(&self) -> TractResult<Vec<String>>[src]
fn is_canonic(&self) -> bool[src]
impl TypedOp for Conv[src]
fn as_op(&self) -> &dyn Op[src]
fn as_op_mut(&mut self) -> &mut dyn Op[src]
fn output_facts(
&self,
inputs: &[&TypedTensorInfo]
) -> TractResult<TVec<TypedTensorInfo>>[src]
&self,
inputs: &[&TypedTensorInfo]
) -> TractResult<TVec<TypedTensorInfo>>
fn dispose_dummy_axis(
&self,
model: &TypedModel,
node: &TypedNode,
axis: usize
) -> TractResult<Option<Box<dyn TypedOp>>>[src]
&self,
model: &TypedModel,
node: &TypedNode,
axis: usize
) -> TractResult<Option<Box<dyn TypedOp>>>
fn pulsify(
&self,
_source: &NormalizedModel,
node: &NormalizedNode,
_target: &mut PulsedModel,
_mapping: &HashMap<OutletId, OutletId>,
_pulse: usize
) -> TractResult<TVec<OutletId>>[src]
&self,
_source: &NormalizedModel,
node: &NormalizedNode,
_target: &mut PulsedModel,
_mapping: &HashMap<OutletId, OutletId>,
_pulse: usize
) -> TractResult<TVec<OutletId>>
fn nested_model_multipliers(
&self,
inputs: &[&TypedTensorInfo]
) -> Vec<(Cow<str>, f32)>[src]
&self,
inputs: &[&TypedTensorInfo]
) -> Vec<(Cow<str>, f32)>
impl Default for Conv[src]
impl Clone for Conv[src]
impl Debug for Conv[src]
Auto Trait Implementations
impl Unpin for Conv
impl Sync for Conv
impl Send for Conv
impl UnwindSafe for Conv
impl RefUnwindSafe for Conv
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<[&TensorFact; 4]>,
SmallVec<[&TensorFact; 4]>,
SmallVec<[&TensorFact; 4]>
) -> Result<(SmallVec<[TensorFact; 4]>, SmallVec<[TensorFact; 4]>, SmallVec<[TensorFact; 4]>), TractError>[src]
&mut Self,
SmallVec<[&TensorFact; 4]>,
SmallVec<[&TensorFact; 4]>,
SmallVec<[&TensorFact; 4]>
) -> Result<(SmallVec<[TensorFact; 4]>, SmallVec<[TensorFact; 4]>, SmallVec<[TensorFact; 4]>), TractError>
fn nboutputs(&Self) -> Result<usize, TractError>[src]
fn observe_outlets(
&Self,
&ModelImpl<TensorFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<TensorFact, Box<dyn InferenceOp + 'static>>
) -> Result<Vec<OutletId>, TractError>[src]
&Self,
&ModelImpl<TensorFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<TensorFact, 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<TensorFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<TensorFact, Box<dyn InferenceOp + 'static>>,
&mut ModelImpl<TypedTensorInfo, Box<dyn TypedOp + 'static>>,
&HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>[src]
&Self,
&ModelImpl<TensorFact, Box<dyn InferenceOp + 'static>>,
&BaseNode<TensorFact, Box<dyn InferenceOp + 'static>>,
&mut ModelImpl<TypedTensorInfo, Box<dyn TypedOp + 'static>>,
&HashMap<OutletId, OutletId, RandomState>
) -> Result<SmallVec<[OutletId; 4]>, TractError>
fn infer(
&mut self,
inputs: TVec<&TensorFact>,
outputs: TVec<&TensorFact>,
observed: TVec<&TensorFact>
) -> TractResult<(TVec<TensorFact>, TVec<TensorFact>, TVec<TensorFact>)>[src]
&mut self,
inputs: TVec<&TensorFact>,
outputs: TVec<&TensorFact>,
observed: TVec<&TensorFact>
) -> TractResult<(TVec<TensorFact>, TVec<TensorFact>, TVec<TensorFact>)>
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> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for 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> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
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 as_any(&self) -> &(dyn Any + 'static)[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)[src]
impl<T> Clone for T where
T: Clone, [src]
T: Clone,