pub struct SoftmaxEpoch<'a> { /* private fields */ }Expand description
Applies [embedded-nn]’s fixed-point softmax over a row of logits.
Implementations§
Source§impl<'a> SoftmaxEpoch<'a>
impl<'a> SoftmaxEpoch<'a>
Sourcepub fn new_1d(
input: &'a [i8],
output: &'a mut [i8],
mult: i32,
shift: i32,
diff_min: i32,
) -> Self
pub fn new_1d( input: &'a [i8], output: &'a mut [i8], mult: i32, shift: i32, diff_min: i32, ) -> Self
Softmax over a single row of input.len() logits.
mult, shift and diff_min are the fixed-point parameters ST’s
compiler emits next to the network (its sw_info); they must correspond
to the quantization scale of input.
Trait Implementations§
Source§impl SoftwareKernel for SoftmaxEpoch<'_>
impl SoftwareKernel for SoftmaxEpoch<'_>
Auto Trait Implementations§
impl<'a> !UnwindSafe for SoftmaxEpoch<'a>
impl<'a> Freeze for SoftmaxEpoch<'a>
impl<'a> RefUnwindSafe for SoftmaxEpoch<'a>
impl<'a> Send for SoftmaxEpoch<'a>
impl<'a> Sync for SoftmaxEpoch<'a>
impl<'a> Unpin for SoftmaxEpoch<'a>
impl<'a> UnsafeUnpin for SoftmaxEpoch<'a>
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