CudnnRnnParamsSize

public final class CudnnRnnParamsSize

Computes size of weights that can be used by a Cudnn RNN model.

Return the params size that can be used by the Cudnn RNN model. Subsequent weight allocation and initialization should use this size.

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. 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. params_size: The size of the params buffer that should be allocated and initialized for this RNN model. Note that this params buffer may not be compatible across GPUs. Please use CudnnRNNParamsWeights and CudnnRNNParamsBiases to save and restore them in a way that is compatible across different runs.

Nested Classes

class CudnnRnnParamsSize.Options Optional attributes for CudnnRnnParamsSize  

Constants

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

Public Methods

Output<U>
asOutput()
Returns the symbolic handle of the tensor.
static <U extends TNumber, T extends TNumber> CudnnRnnParamsSize<U>
create(Scope scope, Operand<TInt32> numLayers, Operand<TInt32> numUnits, Operand<TInt32> inputSize, Class<T> T, Class<U> S, Options... options)
Factory method to create a class wrapping a new CudnnRnnParamsSize operation.
static CudnnRnnParamsSize.Options
direction(String direction)
static CudnnRnnParamsSize.Options
dropout(Float dropout)
static CudnnRnnParamsSize.Options
inputMode(String inputMode)
static CudnnRnnParamsSize.Options
numProj(Long numProj)
Output<U>
static CudnnRnnParamsSize.Options
rnnMode(String rnnMode)
static CudnnRnnParamsSize.Options
seed(Long seed)
static CudnnRnnParamsSize.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: "CudnnRNNParamsSize"

Public Methods

public Output<U> 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 CudnnRnnParamsSize<U> create (Scope scope, Operand<TInt32> numLayers, Operand<TInt32> numUnits, Operand<TInt32> inputSize, Class<T> T, Class<U> S, Options... options)

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

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

public static CudnnRnnParamsSize.Options direction (String direction)

public static CudnnRnnParamsSize.Options dropout (Float dropout)

public static CudnnRnnParamsSize.Options inputMode (String inputMode)

public static CudnnRnnParamsSize.Options numProj (Long numProj)

public Output<U> paramsSize ()

public static CudnnRnnParamsSize.Options rnnMode (String rnnMode)

public static CudnnRnnParamsSize.Options seed (Long seed)

public static CudnnRnnParamsSize.Options seed2 (Long seed2)