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 copy of the value. Read more
1.0.0 · 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 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