pub struct ReductionOp<'a> {
pub axes: Option<&'a [i32]>,
pub keep_dims: bool,
}Expand description
Shape inference for reduction operators.
Fields§
§axes: Option<&'a [i32]>Axes over which the reduction is applied.
Reduction ops take the axes as an attribute in ONNX opset <= 13 and an input in opset 18+.
keep_dims: boolTrue if the reduced dimension is retained as a 1-sized dimension in the output.
Trait Implementations§
Source§impl<'a> Clone for ReductionOp<'a>
impl<'a> Clone for ReductionOp<'a>
Source§fn clone(&self) -> ReductionOp<'a>
fn clone(&self) -> ReductionOp<'a>
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<'a> Debug for ReductionOp<'a>
impl<'a> Debug for ReductionOp<'a>
Source§impl InferShapes for ReductionOp<'_>
impl InferShapes for ReductionOp<'_>
Source§fn infer_shapes(
&self,
inputs: &[SymTensor],
_sym_gen: &mut SymbolGen,
) -> Result<Vec<SymTensor>, InferShapesError>
fn infer_shapes( &self, inputs: &[SymTensor], _sym_gen: &mut SymbolGen, ) -> Result<Vec<SymTensor>, InferShapesError>
Infer the shapes and optionally values of an operator’s outputs given
its inputs. Read more
Source§impl<'a> PartialEq for ReductionOp<'a>
impl<'a> PartialEq for ReductionOp<'a>
impl<'a> StructuralPartialEq for ReductionOp<'a>
Auto Trait Implementations§
impl<'a> Freeze for ReductionOp<'a>
impl<'a> RefUnwindSafe for ReductionOp<'a>
impl<'a> Send for ReductionOp<'a>
impl<'a> Sync for ReductionOp<'a>
impl<'a> Unpin for ReductionOp<'a>
impl<'a> UnwindSafe for ReductionOp<'a>
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> 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