#[repr(u8)]pub enum CrossEntropyTargetKind {
ClassIndex = 0,
SoftProb = 1,
}Expand description
CrossEntropy target-tensor kind. Selects between PyTorch’s two
target formats: class indices (i64[N]) and soft probabilities
(T[N, C] — used for label smoothing / distillation).
Variants§
ClassIndex = 0
Target is class-index i64[N].
SoftProb = 1
Target is soft probability T[N, C] (same dtype as input).
Trait Implementations§
Source§impl Clone for CrossEntropyTargetKind
impl Clone for CrossEntropyTargetKind
Source§fn clone(&self) -> CrossEntropyTargetKind
fn clone(&self) -> CrossEntropyTargetKind
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 CrossEntropyTargetKind
Source§impl Debug for CrossEntropyTargetKind
impl Debug for CrossEntropyTargetKind
impl Eq for CrossEntropyTargetKind
Source§impl Hash for CrossEntropyTargetKind
impl Hash for CrossEntropyTargetKind
Source§impl PartialEq for CrossEntropyTargetKind
impl PartialEq for CrossEntropyTargetKind
Source§fn eq(&self, other: &CrossEntropyTargetKind) -> bool
fn eq(&self, other: &CrossEntropyTargetKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CrossEntropyTargetKind
Auto Trait Implementations§
impl Freeze for CrossEntropyTargetKind
impl RefUnwindSafe for CrossEntropyTargetKind
impl Send for CrossEntropyTargetKind
impl Sync for CrossEntropyTargetKind
impl Unpin for CrossEntropyTargetKind
impl UnsafeUnpin for CrossEntropyTargetKind
impl UnwindSafe for CrossEntropyTargetKind
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