pub struct Elu {
pub alpha: f32,
}Expand description
Computes the Exponential Linear Unit function.
Computes if x >= 0 { x } else { alpha * (exp(x) - 1) }.
Fields§
§alpha: f32Trait Implementations§
Source§impl SimdUnaryOp<f32> for Elu
impl SimdUnaryOp<f32> for Elu
Source§fn eval<I: Isa>(&self, isa: I, x: I::F32) -> I::F32
fn eval<I: Isa>(&self, isa: I, x: I::F32) -> I::F32
Evaluate the unary function on the elements in
x. Read moreSource§fn map<'dst>(
&self,
input: &[T],
output: &'dst mut [MaybeUninit<T>],
) -> &'dst mut [T]
fn map<'dst>( &self, input: &[T], output: &'dst mut [MaybeUninit<T>], ) -> &'dst mut [T]
Apply this function to a slice. Read more
Source§fn map_mut(&self, input: &mut [T])
fn map_mut(&self, input: &mut [T])
Apply a vectorized unary function to a mutable slice. Read more
Source§fn scalar_eval(&self, x: T) -> T
fn scalar_eval(&self, x: T) -> T
Apply this operation to a single element.
Auto Trait Implementations§
impl Freeze for Elu
impl RefUnwindSafe for Elu
impl Send for Elu
impl Sync for Elu
impl Unpin for Elu
impl UnwindSafe for Elu
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more