Enum Activation

    • Method Detail

      • values

        public static Activation[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Activation c : Activation.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Activation valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getActivationFunction

        public IActivation getActivationFunction()
        Creates an instance of the activation function
        Returns:
        an instance of the activation function
      • fromString

        public static Activation fromString​(String name)
        Returns the activation function enum value
        Parameters:
        name - the case-insensitive opName of the activation function
        Returns:
        the activation function enum value
      • asSameDiff

        public SDVariable asSameDiff​(SameDiff sd,
                                     SDVariable input)
        Get the Activation as a SameDiff variable
        Parameters:
        sd - SameDiff instance
        input - Input variable to apply the activation function to
        Returns:
        SDVariable: output after applying the activation function
        See Also:
        asSameDiff(SameDiff, SDVariable)
      • asSameDiff

        public SDVariable asSameDiff​(String variableName,
                                     SameDiff sd,
                                     SDVariable input)
        Get the Activation as a SameDiff variable
        Parameters:
        variableName - Variable name
        sd - SameDiff instance
        input - Input variable to apply the activation function to
        Returns:
        SDVariable: output after applying the activation function