pub enum ExtActivation {
LeakyRelu(f64),
Swish(f64),
Relu,
Sigmoid,
Tanh,
Linear,
}Expand description
Extended activation functions with additional variants for f64 paths.
Variants§
LeakyRelu(f64)
Leaky ReLU: max(alpha * x, x) where alpha is the negative slope.
Swish(f64)
Swish: x * sigmoid(beta * x). beta=1 recovers SiLU.
Relu
Standard ReLU.
Sigmoid
Logistic sigmoid.
Tanh
Hyperbolic tangent.
Linear
Identity.
Implementations§
Trait Implementations§
Source§impl Clone for ExtActivation
impl Clone for ExtActivation
Source§fn clone(&self) -> ExtActivation
fn clone(&self) -> ExtActivation
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 moreSource§impl Debug for ExtActivation
impl Debug for ExtActivation
Source§impl PartialEq for ExtActivation
impl PartialEq for ExtActivation
Source§fn eq(&self, other: &ExtActivation) -> bool
fn eq(&self, other: &ExtActivation) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExtActivation
Auto Trait Implementations§
impl Freeze for ExtActivation
impl RefUnwindSafe for ExtActivation
impl Send for ExtActivation
impl Sync for ExtActivation
impl Unpin for ExtActivation
impl UnsafeUnpin for ExtActivation
impl UnwindSafe for ExtActivation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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