Class MLCActivationType


  • public final class MLCActivationType
    extends java.lang.Object
    [@enum] MLCActivationType An activation type that you specify for an activation descriptor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int Absolute
      The absolute activation type.
      static int CELU
      The CELU activation type.
      static int Clamp
      The clamp activation type.
      static int Count
      Must be last
      static int ELU
      The parametric ELU activation type.
      static int GELU
      The GELU activation type.
      static int HardShrink
      The hard shrink activation type.
      static int HardSigmoid
      The hard sigmoid activation type.
      static int HardSwish
      The hardswish activation type.
      static int Linear
      The linear activation type.
      static int LogSigmoid
      The log sigmoid activation type.
      static int None
      The identity activation type.
      static int ReLU
      The ReLU activation type.
      static int ReLUN
      The ReLUN activation type.
      static int SELU
      The SELU activation type.
      static int Sigmoid
      The sigmoid activation type.
      static int SoftPlus
      The parametric soft plus activation type.
      static int SoftShrink
      The soft shrink activation type.
      static int SoftSign
      The parametric soft sign activation type.
      static int Tanh
      The hyperbolic tangent (TanH) activation type.
      static int TanhShrink
      The hyperbolic tangent (TanH) shrink activation type.
      static int Threshold
      The threshold activation type.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ReLU

        public static final int ReLU
        The ReLU activation type. This activation type implements the following function: \code f(x) = x >= 0 ? x : a * x \endcode
        See Also:
        Constant Field Values
      • Linear

        public static final int Linear
        The linear activation type. This activation type implements the following function: \code f(x) = a * x + b \endcode
        See Also:
        Constant Field Values
      • Sigmoid

        public static final int Sigmoid
        The sigmoid activation type. This activation type implements the following function: \code f(x) = 1 / (1 + e⁻ˣ) \endcode
        See Also:
        Constant Field Values
      • HardSigmoid

        public static final int HardSigmoid
        The hard sigmoid activation type. This activation type implements the following function: \code f(x) = clamp((x * a) + b, 0, 1) \endcode
        See Also:
        Constant Field Values
      • Tanh

        public static final int Tanh
        The hyperbolic tangent (TanH) activation type. This activation type implements the following function: \code f(x) = a * tanh(b * x) \endcode
        See Also:
        Constant Field Values
      • Absolute

        public static final int Absolute
        The absolute activation type. This activation type implements the following function: \code f(x) = fabs(x) \endcode
        See Also:
        Constant Field Values
      • SoftPlus

        public static final int SoftPlus
        The parametric soft plus activation type. This activation type implements the following function: \code f(x) = a * log(1 + e^(b * x)) \endcode
        See Also:
        Constant Field Values
      • SoftSign

        public static final int SoftSign
        The parametric soft sign activation type. This activation type implements the following function: \code f(x) = x / (1 + abs(x)) \endcod
        See Also:
        Constant Field Values
      • ELU

        public static final int ELU
        The parametric ELU activation type. This activation type implements the following function: \code f(x) = x >= 0 ? x : a * (exp(x) - 1) \endcode
        See Also:
        Constant Field Values
      • ReLUN

        public static final int ReLUN
        The ReLUN activation type. This activation type implements the following function: \code f(x) = min((x >= 0 ? x : a * x), b) \endcode
        See Also:
        Constant Field Values
      • LogSigmoid

        public static final int LogSigmoid
        The log sigmoid activation type. This activation type implements the following function: \code f(x) = log(1 / (1 + exp(-x))) \endcode
        See Also:
        Constant Field Values
      • SELU

        public static final int SELU
        The SELU activation type. This activation type implements the following function: \code f(x) = scale * (max(0, x) + min(0, α * (exp(x) − 1))) \endcode where: \code α = 1.6732632423543772848170429916717 scale = 1.0507009873554804934193349852946 \endcode
        See Also:
        Constant Field Values
      • CELU

        public static final int CELU
        The CELU activation type. This activation type implements the following function: \code f(x) = max(0, x) + min(0, a * (exp(x / a) − 1)) \endcode
        See Also:
        Constant Field Values
      • HardShrink

        public static final int HardShrink
        The hard shrink activation type. This activation type implements the following function: \code f(x) = x, if x > a or x < −a, else 0 \endcode
        See Also:
        Constant Field Values
      • SoftShrink

        public static final int SoftShrink
        The soft shrink activation type. This activation type implements the following function: \code f(x) = x - a, if x > a, x + a, if x < −a, else 0 \endcode
        See Also:
        Constant Field Values
      • TanhShrink

        public static final int TanhShrink
        The hyperbolic tangent (TanH) shrink activation type. This activation type implements the following function: \code f(x) = x - tanh(x) \endcode
        See Also:
        Constant Field Values
      • Threshold

        public static final int Threshold
        The threshold activation type. This activation type implements the following function: \code f(x) = x, if x > a, else b \endcode
        See Also:
        Constant Field Values
      • GELU

        public static final int GELU
        The GELU activation type. This activation type implements the following function: \code f(x) = x * CDF(x) \endcode
        See Also:
        Constant Field Values
      • HardSwish

        public static final int HardSwish
        The hardswish activation type. This activation type implements the following function: \code f(x) = 0, if x <= -3 f(x) = x, if x >= +3 f(x) = x * (x + 3)/6, otherwise \endcode API-Since: 14.5
        See Also:
        Constant Field Values
      • Clamp

        public static final int Clamp
        The clamp activation type. This activation type implements the following function: \code f(x) = min(max(x, a), b) \endcode API-Since: 14.5
        See Also:
        Constant Field Values