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
sourceimpl Clone for Activation
impl Clone for Activation
sourcefn clone(&self) -> Activation
fn clone(&self) -> Activation
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Activation
impl Debug for Activation
sourceimpl<'de> Deserialize<'de> for Activation
impl<'de> Deserialize<'de> for Activation
sourcefn 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
sourceimpl FallibleModule for Activation
impl FallibleModule for Activation
sourceimpl PartialEq<Activation> for Activation
impl PartialEq<Activation> for Activation
sourceimpl TryFrom<&str> for Activation
impl TryFrom<&str> for Activation
sourceimpl TryFrom<String> for Activation
impl TryFrom<String> for Activation
impl Copy for Activation
impl Eq for Activation
impl StructuralEq for Activation
impl StructuralPartialEq for Activation
Auto Trait Implementations
impl RefUnwindSafe for Activation
impl Send for Activation
impl Sync for Activation
impl Unpin for Activation
impl UnwindSafe for Activation
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more