pub struct SoftMax<D>where
D: IntoDims,{
pub dims: D,
}Expand description
Softmax operation
Fields
dims: DDimensions to calculate softmax across
Trait Implementations
sourceimpl<Input, D> Module<'_, Input> for SoftMax<D>where
D: IntoDims + Clone,
Input: Clone + Max + Sub<<Input as Max>::Output>,
<Input as Sub<<Input as Max>::Output>>::Output: Exp,
<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output: Clone + Sum,
<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output: Div<<<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output as Sum>::Output>,
impl<Input, D> Module<'_, Input> for SoftMax<D>where
D: IntoDims + Clone,
Input: Clone + Max + Sub<<Input as Max>::Output>,
<Input as Sub<<Input as Max>::Output>>::Output: Exp,
<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output: Clone + Sum,
<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output: Div<<<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output as Sum>::Output>,
type Output = <<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output as Div<<<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output as Sum>::Output>>::Output
type Output = <<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output as Div<<<<Input as Sub<<Input as Max>::Output>>::Output as Exp>::Output as Sum>::Output>>::Output
Output of forward operation on Module
type Params = ()
type Params = ()
Parameters of Module
sourcefn parameters(&mut self) -> Self::Params
fn parameters(&mut self) -> Self::Params
Get parameters of Module
sourceimpl<D: Ord> Ord for SoftMax<D>where
D: IntoDims,
impl<D: Ord> Ord for SoftMax<D>where
D: IntoDims,
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<D: PartialEq> PartialEq<SoftMax<D>> for SoftMax<D>where
D: IntoDims,
impl<D: PartialEq> PartialEq<SoftMax<D>> for SoftMax<D>where
D: IntoDims,
sourceimpl<D: PartialOrd> PartialOrd<SoftMax<D>> for SoftMax<D>where
D: IntoDims,
impl<D: PartialOrd> PartialOrd<SoftMax<D>> for SoftMax<D>where
D: IntoDims,
sourcefn partial_cmp(&self, other: &SoftMax<D>) -> Option<Ordering>
fn partial_cmp(&self, other: &SoftMax<D>) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl<D: Copy> Copy for SoftMax<D>where
D: IntoDims,
impl<D: Eq> Eq for SoftMax<D>where
D: IntoDims,
impl<D> StructuralEq for SoftMax<D>where
D: IntoDims,
impl<D> StructuralPartialEq for SoftMax<D>where
D: IntoDims,
Auto Trait Implementations
impl<D> RefUnwindSafe for SoftMax<D>where
D: RefUnwindSafe,
impl<D> Send for SoftMax<D>where
D: Send,
impl<D> Sync for SoftMax<D>where
D: Sync,
impl<D> Unpin for SoftMax<D>where
D: Unpin,
impl<D> UnwindSafe for SoftMax<D>where
D: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more