tf.raw_ops.CudnnRNNBackpropV2

Backprop step of CudnnRNN.

Compute the backprop of both data and weights in a RNN. Takes an extra "host_reserved" inupt than CudnnRNNBackprop, which is used to determine RNN cudnnRNNAlgo_t and cudnnMathType_t.

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: A 3-D tensor with the shape of [seq_length, batch_size, input_size]. input_h: A 3-D tensor with the shape of [num_layer * dir, batch_size, 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 output: A 3-D tensor with the shape of [seq_length, batch_size, 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. reserve_space: The same reserve_space produced in the forward operation. host_reserved: The same host_reserved 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.

inputA Tensor. Must be one of the following types: bfloat16, half, float32, float64.
input_hA Tensor. Must have the same type as input.
input_cA Tensor. Must have the same type as input.
paramsA Tensor. Must have the same type as input.
outputA Tensor. Must have the same type as input.
output_hA Tensor. Must have the same type as input.
output_cA Tensor. Must have the same type as input.
output_backpropA Tensor. Must have the same type as input.
output_h_backpropA Tensor. Must have the same type as input.
output_c_backpropA Tensor. Must have the same type as input.
reserve_spaceA Tensor. Must have the same type as input.
host_reservedA Tensor of type int8.
rnn_modeAn optional string from: "rnn_relu", "rnn_tanh", "lstm", "gru". Defaults to "lstm".
input_modeAn optional string from: "linear_input", "skip_input", "auto_select". Defaults to "linear_input".
directionAn optional string from: "unidirectional", "bidirectional". Defaults to "unidirectional".
dropoutAn optional float. Defaults to 0.
seedAn optional int. Defaults to 0.
seed2An optional int. Defaults to 0.
nameA name for the operation (optional).

A tuple of Tensor objects (input_backprop, input_h_backprop, input_c_backprop, params_backprop).
input_backpropA Tensor. Has the same type as input.
input_h_backpropA Tensor. Has the same type as input.
input_c_backpropA Tensor. Has the same type as input.
params_backpropA Tensor. Has the same type as input.