#[repr(i32)]pub enum ReduceOperation {
kSUM = 0,
kPROD = 1,
kMAX = 2,
kMIN = 3,
kAVG = 4,
kNONE = 5,
}Expand description
! ! \enum ReduceOperation ! ! \brief Enumerates the reduce operations that may be performed by a Reduce layer. ! ! The table shows the result of reducing across an empty volume of a given type. ! ! Operation | kFLOAT and kHALF | kINT32 | kINT8 ! ——— | —————– | —–– | —– ! kSUM | 0 | 0 | 0 ! kPROD | 1 | 1 | 1 ! kMAX | negative infinity | INT_MIN | -128 ! kMIN | positive infinity | INT_MAX | 127 ! kAVG | NaN | 0 | -128 ! kNONE | Undefined | Undefined | Undefined ! ! The current version of TensorRT usually performs reduction for kINT8 via kFLOAT or kHALF. ! The kINT8 values show the quantized representations of the floating-point values. ! \note kNONE is a reduce operation which does not modify the input tensor. ! This is applicable to Multi-Device mode only, ! as a reduce operation is not mandatory for certain collective operations. ! See \ref INetworkDefinition::addDistCollective for more details. !
Variants§
kSUM = 0
!< Sum of the elements.
kPROD = 1
!< Product of the elements.
kMAX = 2
!< Maximum of the elements.
kMIN = 3
!< Minimum of the elements.
kAVG = 4
!< Average of the elements.
kNONE = 5
!< No reduction.
Trait Implementations§
Source§impl Clone for ReduceOperation
impl Clone for ReduceOperation
Source§fn clone(&self) -> ReduceOperation
fn clone(&self) -> ReduceOperation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReduceOperation
Source§impl Debug for ReduceOperation
impl Debug for ReduceOperation
impl Eq for ReduceOperation
Source§impl From<ReduceOperation> for ReduceOperation
impl From<ReduceOperation> for ReduceOperation
Source§fn from(value: ReduceOperation) -> Self
fn from(value: ReduceOperation) -> Self
Source§impl Hash for ReduceOperation
impl Hash for ReduceOperation
Source§impl Into<ReduceOperation> for ReduceOperation
impl Into<ReduceOperation> for ReduceOperation
Source§fn into(self) -> ReduceOperation
fn into(self) -> ReduceOperation
Source§impl Ord for ReduceOperation
impl Ord for ReduceOperation
Source§fn cmp(&self, other: &ReduceOperation) -> Ordering
fn cmp(&self, other: &ReduceOperation) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ReduceOperation
impl PartialEq for ReduceOperation
Source§fn eq(&self, other: &ReduceOperation) -> bool
fn eq(&self, other: &ReduceOperation) -> bool
self and other values to be equal, and is used by ==.