#[repr(i32)]pub enum ActivationType {
Show 14 variants
kRELU = 0,
kSIGMOID = 1,
kTANH = 2,
kLEAKY_RELU = 3,
kELU = 4,
kSELU = 5,
kSOFTSIGN = 6,
kSOFTPLUS = 7,
kCLIP = 8,
kHARD_SIGMOID = 9,
kSCALED_TANH = 10,
kTHRESHOLDED_RELU = 11,
kGELU_ERF = 12,
kGELU_TANH = 13,
}Expand description
ActivationType
Enumerates the types of activation to perform in an activation layer.
Variants§
kRELU = 0
< Rectified linear activation.
kSIGMOID = 1
< Sigmoid activation.
kTANH = 2
< TanH activation.
kLEAKY_RELU = 3
< LeakyRelu activation: x>=0 ? x : alpha * x.
kELU = 4
< Elu activation: x>=0 ? x : alpha * (exp(x) - 1).
kSELU = 5
< Selu activation: x>0 ? beta * x : beta * (alpha*exp(x) - alpha)
kSOFTSIGN = 6
< Softsign activation: x / (1+|x|)
kSOFTPLUS = 7
< Parametric softplus activation: alphalog(exp(betax)+1)
kCLIP = 8
< Clip activation: max(alpha, min(beta, x))
kHARD_SIGMOID = 9
< Hard sigmoid activation: max(0, min(1, alpha*x+beta))
kSCALED_TANH = 10
< Scaled tanh activation: alphatanh(betax)
kTHRESHOLDED_RELU = 11
< Thresholded ReLU activation: x>alpha ? x : 0
kGELU_ERF = 12
< GELU erf activation: 0.5 * x * (1 + erf(sqrt(0.5) * x))
kGELU_TANH = 13
< GELU tanh activation: 0.5 * x * (1 + tanh(sqrt(2/pi) * (0.044715F * pow(x, 3) + x)))
Trait Implementations§
Source§impl Clone for ActivationType
impl Clone for ActivationType
Source§fn clone(&self) -> ActivationType
fn clone(&self) -> ActivationType
Returns a duplicate 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 ExternType for ActivationType
impl ExternType for ActivationType
Source§impl From<ActivationType> for ActivationType
impl From<ActivationType> for ActivationType
Source§fn from(value: ActivationType) -> Self
fn from(value: ActivationType) -> Self
Converts to this type from the input type.
Source§impl Hash for ActivationType
impl Hash for ActivationType
Source§impl Into<ActivationType> for ActivationType
impl Into<ActivationType> for ActivationType
Source§fn into(self) -> ActivationType
fn into(self) -> ActivationType
Converts this type into the (usually inferred) input type.
Source§impl PartialEq for ActivationType
impl PartialEq for ActivationType
impl Eq for ActivationType
impl StructuralPartialEq for ActivationType
impl UniquePtrTarget for ActivationType
impl VectorElement for ActivationType
impl WeakPtrTarget for ActivationType
Auto Trait Implementations§
impl Freeze for ActivationType
impl RefUnwindSafe for ActivationType
impl Send for ActivationType
impl Sync for ActivationType
impl Unpin for ActivationType
impl UnsafeUnpin for ActivationType
impl UnwindSafe for ActivationType
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