public enum Activation extends Enum<Activation>
Enum Constant and Description |
---|
CUBE |
ELU |
HARDSIGMOID |
HARDTANH |
IDENTITY |
LEAKYRELU |
RATIONALTANH |
RECTIFIEDTANH |
RELU |
RRELU |
SELU |
SIGMOID |
SOFTMAX |
SOFTPLUS |
SOFTSIGN |
SWISH |
TANH |
Modifier and Type | Method and Description |
---|---|
SDVariable |
asSameDiff(SameDiff sd,
SDVariable input)
Get the Activation as a SameDiff variable
|
SDVariable |
asSameDiff(String variableName,
SameDiff sd,
SDVariable input)
Get the Activation as a SameDiff variable
|
TransformOp |
asTransform(INDArray in,
boolean dup)
Get the Activation function as an ND4J Transform, applied on either the input or a copy of the input
|
Op |
asTransformDerivative(INDArray in,
boolean dup)
Get the Activation function derivative (i.e., dOut/dIn) as an ND4J Transform, applied on either the input
or a copy of the input
|
static Activation |
fromString(String name)
Returns the activation function enum value
|
IActivation |
getActivationFunction()
Creates an instance of the activation function
|
static 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.
|
public static final Activation CUBE
public static final Activation ELU
public static final Activation HARDSIGMOID
public static final Activation HARDTANH
public static final Activation IDENTITY
public static final Activation LEAKYRELU
public static final Activation RATIONALTANH
public static final Activation RELU
public static final Activation RRELU
public static final Activation SIGMOID
public static final Activation SOFTMAX
public static final Activation SOFTPLUS
public static final Activation SOFTSIGN
public static final Activation TANH
public static final Activation RECTIFIEDTANH
public static final Activation SELU
public static final Activation SWISH
public static Activation[] values()
for (Activation c : Activation.values()) System.out.println(c);
public static Activation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic IActivation getActivationFunction()
public static Activation fromString(String name)
name
- the case-insensitive opName of the activation functionpublic SDVariable asSameDiff(SameDiff sd, SDVariable input)
sd
- SameDiff instanceinput
- Input variable to apply the activation function toasSameDiff(SameDiff, SDVariable)
public SDVariable asSameDiff(String variableName, SameDiff sd, SDVariable input)
variableName
- Variable namesd
- SameDiff instanceinput
- Input variable to apply the activation function topublic TransformOp asTransform(INDArray in, boolean dup)
in
- Input to apply the activation function op todup
- If true: duplicate the array before applying the transform. If false: don't duplicateNd4j.getExecutioner().exec(op)
public Op asTransformDerivative(INDArray in, boolean dup)
in
- Input to apply the activation function derivative op todup
- If true: duplicate the array before applying the transform. If false: don't duplicateNd4j.getExecutioner().exec(op)
Copyright © 2018. All rights reserved.