Package org.nd4j.linalg.activations
Enum Activation
- java.lang.Object
-
- java.lang.Enum<Activation>
-
- org.nd4j.linalg.activations.Activation
-
- All Implemented Interfaces:
Serializable
,Comparable<Activation>
public enum Activation extends Enum<Activation>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SDVariable
asSameDiff(String variableName, SameDiff sd, SDVariable input)
Get the Activation as a SameDiff variableSDVariable
asSameDiff(SameDiff sd, SDVariable input)
Get the Activation as a SameDiff variablestatic Activation
fromString(String name)
Returns the activation function enum valueIActivation
getActivationFunction()
Creates an instance of the activation functionstatic Activation
valueOf(String name)
Returns the enum constant of this type with the specified name.static Activation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CUBE
public static final Activation CUBE
-
ELU
public static final Activation ELU
-
HARDSIGMOID
public static final Activation HARDSIGMOID
-
HARDTANH
public static final Activation HARDTANH
-
IDENTITY
public static final Activation IDENTITY
-
LEAKYRELU
public static final Activation LEAKYRELU
-
RATIONALTANH
public static final Activation RATIONALTANH
-
RELU
public static final Activation RELU
-
RELU6
public static final Activation RELU6
-
RRELU
public static final Activation RRELU
-
SIGMOID
public static final Activation SIGMOID
-
SOFTMAX
public static final Activation SOFTMAX
-
SOFTPLUS
public static final Activation SOFTPLUS
-
SOFTSIGN
public static final Activation SOFTSIGN
-
TANH
public static final Activation TANH
-
RECTIFIEDTANH
public static final Activation RECTIFIEDTANH
-
SELU
public static final Activation SELU
-
SWISH
public static final Activation SWISH
-
THRESHOLDEDRELU
public static final Activation THRESHOLDEDRELU
-
GELU
public static final Activation GELU
-
MISH
public static final Activation MISH
-
-
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 nameNullPointerException
- 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 instanceinput
- 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 namesd
- SameDiff instanceinput
- Input variable to apply the activation function to- Returns:
- SDVariable: output after applying the activation function
-
-