#[non_exhaustive]#[repr(u16)]pub enum ArgReduceKind {
Argmax = 0,
Argmin = 1,
}Expand description
Index-returning reduction discriminant — Phase 4 (ArgReducePlan).
Distinct from ReduceKind because the output dtype is i64
(index), not the input value dtype. Goes through its own plan
shape (ArgReducePlan<T, N>) for the heterogeneous-output-dtype
case.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Argmax = 0
Index of the maximum along the reduced axis. Ties broken by first occurrence (smallest index wins) — PyTorch convention.
Argmin = 1
Index of the minimum along the reduced axis.
Trait Implementations§
Source§impl Clone for ArgReduceKind
impl Clone for ArgReduceKind
Source§fn clone(&self) -> ArgReduceKind
fn clone(&self) -> ArgReduceKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ArgReduceKind
Source§impl Debug for ArgReduceKind
impl Debug for ArgReduceKind
impl Eq for ArgReduceKind
Source§impl Hash for ArgReduceKind
impl Hash for ArgReduceKind
Source§impl PartialEq for ArgReduceKind
impl PartialEq for ArgReduceKind
Source§fn eq(&self, other: &ArgReduceKind) -> bool
fn eq(&self, other: &ArgReduceKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ArgReduceKind
Auto Trait Implementations§
impl Freeze for ArgReduceKind
impl RefUnwindSafe for ArgReduceKind
impl Send for ArgReduceKind
impl Sync for ArgReduceKind
impl Unpin for ArgReduceKind
impl UnsafeUnpin for ArgReduceKind
impl UnwindSafe for ArgReduceKind
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