pub struct Softmax<'src, 'dst> { /* private fields */ }
Expand description
Computes the softmax function over a slice of floats.
The implementation uses a three-pass approach for numerical stability. See https://ogunlao.github.io/2020/04/26/you_dont_really_know_softmax.html. and https://arxiv.org/abs/2001.04438.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'src, 'dst> Freeze for Softmax<'src, 'dst>
impl<'src, 'dst> RefUnwindSafe for Softmax<'src, 'dst>
impl<'src, 'dst> Send for Softmax<'src, 'dst>
impl<'src, 'dst> Sync for Softmax<'src, 'dst>
impl<'src, 'dst> Unpin for Softmax<'src, 'dst>
impl<'src, 'dst> !UnwindSafe for Softmax<'src, 'dst>
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