CudnnRNNBackprop

public final class CudnnRNNBackprop

Backprop step of CudnnRNNV3.

Compute the backprop of both data and weights in a RNN. Takes an extra "sequence_lengths" input than CudnnRNNBackprop.

rnn_mode: Indicates the type of the RNN model. input_mode: Indicates 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. Should be "unidirectional" or "bidirectional". 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. input: If time_major is true, this is a 3-D tensor with the shape of [seq_length, batch_size, input_size]. If time_major is false, the shape is [batch_size, seq_length, input_size]. input_h: If time_major is true, this is a 3-D tensor with the shape of [num_layer * dir, batch_size, num_units]. If time_major is false, the shape is [batch_size, num_layer * dir, num_units]. input_c: For LSTM, a 3-D tensor with the shape of [num_layer * dir, batch, num_units]. For other models, it is ignored. params: A 1-D tensor that contains the weights and biases in an opaque layout. The size must be created through CudnnRNNParamsSize, and initialized separately. Note that they might not be compatible across different generations. So it is a good idea to save and restore sequence_lengths: a vector of lengths of each input sequence. output: If time_major is true, this is a 3-D tensor with the shape of [seq_length, batch_size, dir * num_units]. If time_major is false, the shape is [batch_size, seq_length, dir * num_units]. output_h: The same shape has input_h. output_c: The same shape as input_c for LSTM. An empty tensor for other models. output_backprop: A 3-D tensor with the same shape as output in the forward pass. output_h_backprop: A 3-D tensor with the same shape as output_h in the forward pass. output_c_backprop: A 3-D tensor with the same shape as output_c in the forward pass. time_major: Indicates whether the input/output format is time major or batch major. reserve_space: The same reserve_space produced in the forward operation. input_backprop: The backprop to input in the forward pass. Has the same shape as input. input_h_backprop: The backprop to input_h in the forward pass. Has the same shape as input_h. input_c_backprop: The backprop to input_c in the forward pass. Has the same shape as input_c. params_backprop: The backprop to the params buffer in the forward pass. Has the same shape as params.

Nested Classes

class CudnnRNNBackprop.Options Optional attributes for CudnnRNNBackprop  

Constants

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

Public Methods

static <T extends TNumber> CudnnRNNBackprop<T>
create(Scope scope, Operand<T> input, Operand<T> inputH, Operand<T> inputC, Operand<T> params, Operand<TInt32> sequenceLengths, Operand<T> output, Operand<T> outputH, Operand<T> outputC, Operand<T> outputBackprop, Operand<T> outputHBackprop, Operand<T> outputCBackprop, Operand<T> reserveSpace, Operand<?> hostReserved, Options... options)
Factory method to create a class wrapping a new CudnnRNNBackprop operation.
static CudnnRNNBackprop.Options
direction(String direction)
static CudnnRNNBackprop.Options
dropout(Float dropout)
Output<T>
Output<T>
Output<T>
static CudnnRNNBackprop.Options
inputMode(String inputMode)
static CudnnRNNBackprop.Options
numProj(Long numProj)
Output<T>
static CudnnRNNBackprop.Options
rnnMode(String rnnMode)
static CudnnRNNBackprop.Options
seed(Long seed)
static CudnnRNNBackprop.Options
seed2(Long seed2)
static CudnnRNNBackprop.Options
timeMajor(Boolean timeMajor)

Inherited Methods

Constants

public static final String OP_NAME

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

Constant Value: "CudnnRNNBackpropV3"

Public Methods

public static CudnnRNNBackprop<T> create (Scope scope, Operand<T> input, Operand<T> inputH, Operand<T> inputC, Operand<T> params, Operand<TInt32> sequenceLengths, Operand<T> output, Operand<T> outputH, Operand<T> outputC, Operand<T> outputBackprop, Operand<T> outputHBackprop, Operand<T> outputCBackprop, Operand<T> reserveSpace, Operand<?> hostReserved, Options... options)

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

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

public static CudnnRNNBackprop.Options direction (String direction)

public static CudnnRNNBackprop.Options dropout (Float dropout)

public Output<T> inputBackprop ()

public Output<T> inputCBackprop ()

public Output<T> inputHBackprop ()

public static CudnnRNNBackprop.Options inputMode (String inputMode)

public static CudnnRNNBackprop.Options numProj (Long numProj)

public Output<T> paramsBackprop ()

public static CudnnRNNBackprop.Options rnnMode (String rnnMode)

public static CudnnRNNBackprop.Options seed (Long seed)

public static CudnnRNNBackprop.Options seed2 (Long seed2)

public static CudnnRNNBackprop.Options timeMajor (Boolean timeMajor)