CudnnRNNCanonicalToParams

public final class CudnnRNNCanonicalToParams

Converts CudnnRNN params from canonical form to usable form. It supports the projection in LSTM.

Writes a set of weights into the opaque params buffer so they can be used in upcoming training or inferences.

Note that the params buffer may not be compatible across different GPUs. So any save and restoration should be converted to and from the canonical weights and biases.

num_layers: Specifies the number of layers in the RNN model. num_units: Specifies the size of the hidden state. input_size: Specifies the size of the input state. weights: the canonical form of weights that can be used for saving and restoration. They are more likely to be compatible across different generations. biases: the canonical form of biases that can be used for saving and restoration. They are more likely to be compatible across different generations. num_params_weights: number of weight parameter matrix for all layers. num_params_biases: number of bias parameter vector for all layers. rnn_mode: Indicates the type of the RNN model. input_mode: Indicate whether there is a linear projection between the input and The actual computation before the first layer. 'skip_input' is only allowed when input_size == num_units; 'auto_select' implies 'skip_input' when input_size == num_units; otherwise, it implies 'linear_input'. direction: Indicates whether a bidirectional model will be used. dir = (direction == bidirectional) ? 2 : 1 dropout: dropout probability. When set to 0., dropout is disabled. seed: the 1st part of a seed to initialize dropout. seed2: the 2nd part of a seed to initialize dropout. num_proj: The output dimensionality for the projection matrices. If None or 0, no projection is performed.

Nested Classes

class CudnnRNNCanonicalToParams.Options Optional attributes for CudnnRNNCanonicalToParams  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

Output<T>
asOutput()
Returns the symbolic handle of the tensor.
static <T extends TNumber> CudnnRNNCanonicalToParams<T>
create(Scope scope, Operand<TInt32> numLayers, Operand<TInt32> numUnits, Operand<TInt32> inputSize, Iterable<Operand<T>> weights, Iterable<Operand<T>> biases, Options... options)
Factory method to create a class wrapping a new CudnnRNNCanonicalToParams operation.
static CudnnRNNCanonicalToParams.Options
direction(String direction)
static CudnnRNNCanonicalToParams.Options
dropout(Float dropout)
static CudnnRNNCanonicalToParams.Options
inputMode(String inputMode)
static CudnnRNNCanonicalToParams.Options
numProj(Long numProj)
Output<T>
params()
static CudnnRNNCanonicalToParams.Options
rnnMode(String rnnMode)
static CudnnRNNCanonicalToParams.Options
seed(Long seed)
static CudnnRNNCanonicalToParams.Options
seed2(Long seed2)

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "CudnnRNNCanonicalToParamsV2"

Public Methods

public Output<T> asOutput ()

Returns the symbolic handle of the tensor.

Inputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.

public static CudnnRNNCanonicalToParams<T> create (Scope scope, Operand<TInt32> numLayers, Operand<TInt32> numUnits, Operand<TInt32> inputSize, Iterable<Operand<T>> weights, Iterable<Operand<T>> biases, Options... options)

Factory method to create a class wrapping a new CudnnRNNCanonicalToParams operation.

Parameters
scope current scope
options carries optional attributes values
Returns
  • a new instance of CudnnRNNCanonicalToParams

public static CudnnRNNCanonicalToParams.Options direction (String direction)

public static CudnnRNNCanonicalToParams.Options dropout (Float dropout)

public static CudnnRNNCanonicalToParams.Options inputMode (String inputMode)

public static CudnnRNNCanonicalToParams.Options numProj (Long numProj)

public Output<T> params ()

public static CudnnRNNCanonicalToParams.Options rnnMode (String rnnMode)

public static CudnnRNNCanonicalToParams.Options seed (Long seed)

public static CudnnRNNCanonicalToParams.Options seed2 (Long seed2)