Enum Bidirectional.Mode
- java.lang.Object
-
- java.lang.Enum<Bidirectional.Mode>
-
- org.deeplearning4j.nn.conf.layers.recurrent.Bidirectional.Mode
-
- All Implemented Interfaces:
Serializable
,Comparable<Bidirectional.Mode>
- Enclosing class:
- Bidirectional
public static enum Bidirectional.Mode extends Enum<Bidirectional.Mode>
This Mode enumeration defines how the activations for the forward and backward networks should be combined.
ADD: out = forward + backward (elementwise addition)
MUL: out = forward * backward (elementwise multiplication)
AVERAGE: out = 0.5 * (forward + backward)
CONCAT: Concatenate the activations.
Where 'forward' is the activations for the forward RNN, and 'backward' is the activations for the backward RNN. In all cases except CONCAT, the output activations size is the same size as the standard RNN that is being wrapped by this layer. In the CONCAT case, the output activations size (dimension 1) is 2x larger than the standard RNN's activations array.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Bidirectional.Mode
valueOf(String name)
Returns the enum constant of this type with the specified name.static Bidirectional.Mode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADD
public static final Bidirectional.Mode ADD
-
MUL
public static final Bidirectional.Mode MUL
-
AVERAGE
public static final Bidirectional.Mode AVERAGE
-
CONCAT
public static final Bidirectional.Mode CONCAT
-
-
Method Detail
-
values
public static Bidirectional.Mode[] 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 (Bidirectional.Mode c : Bidirectional.Mode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Bidirectional.Mode 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
-
-