pub enum Activation {
Gelu,
GeluNew,
Relu,
}
Variants§
Gelu
GELU activation function.
GELU(x)=x Φ(x)
where Φ(x) is the CDF for the Gaussian distribution.
GeluNew
GELU activation function (Google/OpenAI flavor).
GELU(x)=x Φ(x)
where Φ(x) is the CDF for the Gaussian distribution.
Relu
ReLU activation function
ReLU(x)=max(0,x)
Trait Implementations§
Source§impl Clone for Activation
impl Clone for Activation
Source§fn clone(&self) -> Activation
fn clone(&self) -> Activation
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Activation
impl Debug for Activation
Source§impl<'de> Deserialize<'de> for Activation
impl<'de> Deserialize<'de> for Activation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FallibleModule for Activation
impl FallibleModule for Activation
Source§impl PartialEq for Activation
impl PartialEq for Activation
Source§impl TryFrom<&str> for Activation
impl TryFrom<&str> for Activation
Source§impl TryFrom<String> for Activation
impl TryFrom<String> for Activation
impl Copy for Activation
impl Eq for Activation
impl StructuralPartialEq for Activation
Auto Trait Implementations§
impl Freeze for Activation
impl RefUnwindSafe for Activation
impl Send for Activation
impl Sync for Activation
impl Unpin for Activation
impl UnwindSafe for Activation
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<M> FallibleModuleT for Mwhere
M: FallibleModule,
impl<M> FallibleModuleT for Mwhere
M: FallibleModule,
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