W3cubDocs

/TensorFlow 2.4

tf.raw_ops.BlockLSTMGrad

Computes the LSTM cell backward propagation for the entire time sequence.

This implementation is to be used in conjunction of LSTMBlock.

Args
seq_len_max A Tensor of type int64. Maximum time length actually used by this input. Outputs are padded with zeros beyond this length.
x A Tensor. Must be one of the following types: half, float32. The sequence input to the LSTM, shape (timelen, batch_size, num_inputs).
cs_prev A Tensor. Must have the same type as x. Value of the initial cell state.
h_prev A Tensor. Must have the same type as x. Initial output of cell (to be used for peephole).
w A Tensor. Must have the same type as x. The weight matrix.
wci A Tensor. Must have the same type as x. The weight matrix for input gate peephole connection.
wcf A Tensor. Must have the same type as x. The weight matrix for forget gate peephole connection.
wco A Tensor. Must have the same type as x. The weight matrix for output gate peephole connection.
b A Tensor. Must have the same type as x. The bias vector.
i A Tensor. Must have the same type as x. The input gate over the whole time sequence.
cs A Tensor. Must have the same type as x. The cell state before the tanh over the whole time sequence.
f A Tensor. Must have the same type as x. The forget gate over the whole time sequence.
o A Tensor. Must have the same type as x. The output gate over the whole time sequence.
ci A Tensor. Must have the same type as x. The cell input over the whole time sequence.
co A Tensor. Must have the same type as x. The cell after the tanh over the whole time sequence.
h A Tensor. Must have the same type as x. The output h vector over the whole time sequence.
cs_grad A Tensor. Must have the same type as x. The current gradient of cs.
h_grad A Tensor. Must have the same type as x. The gradient of h vector.
use_peephole A bool. Whether to use peephole weights.
name A name for the operation (optional).
Returns
A tuple of Tensor objects (x_grad, cs_prev_grad, h_prev_grad, w_grad, wci_grad, wcf_grad, wco_grad, b_grad).
x_grad A Tensor. Has the same type as x.
cs_prev_grad A Tensor. Has the same type as x.
h_prev_grad A Tensor. Has the same type as x.
w_grad A Tensor. Has the same type as x.
wci_grad A Tensor. Has the same type as x.
wcf_grad A Tensor. Has the same type as x.
wco_grad A Tensor. Has the same type as x.
b_grad A Tensor. Has the same type as x.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/raw_ops/BlockLSTMGrad