Warning: This API is deprecated and will be removed in a future version of TensorFlow after the replacement is stable.

BlockLSTMGrad

public final class BlockLSTMGrad

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

This implementation is to be used in conjunction of LSTMBlock.

Public Methods

Output <T>
bGrad ()
The gradient for w to be back-propped.
static <T extends Number> BlockLSTMGrad <T>
create ( Scope scope, Operand <Long> seqLenMax, Operand <T> x, Operand <T> csPrev, Operand <T> hPrev, Operand <T> w, Operand <T> wci, Operand <T> wcf, Operand <T> wco, Operand <T> b, Operand <T> i, Operand <T> cs, Operand <T> f, Operand <T> o, Operand <T> ci, Operand <T> co, Operand <T> h, Operand <T> csGrad, Operand <T> hGrad, Boolean usePeephole)
Factory method to create a class wrapping a new BlockLSTMGrad operation.
Output <T>
csPrevGrad ()
The gradient of cs_prev to be back-propped.
Output <T>
hPrevGrad ()
The gradient of h_prev to be back-propped.
Output <T>
wGrad ()
The gradient for w to be back-propped.
Output <T>
wcfGrad ()
The gradient for wcf to be back-propped.
Output <T>
wciGrad ()
The gradient for wci to be back-propped.
Output <T>
wcoGrad ()
The gradient for wco to be back-propped.
Output <T>
xGrad ()
The gradient of x to be back-propped.

Inherited Methods

Public Methods

public Output <T> bGrad ()

The gradient for w to be back-propped.

public static BlockLSTMGrad <T> create ( Scope scope, Operand <Long> seqLenMax, Operand <T> x, Operand <T> csPrev, Operand <T> hPrev, Operand <T> w, Operand <T> wci, Operand <T> wcf, Operand <T> wco, Operand <T> b, Operand <T> i, Operand <T> cs, Operand <T> f, Operand <T> o, Operand <T> ci, Operand <T> co, Operand <T> h, Operand <T> csGrad, Operand <T> hGrad, Boolean usePeephole)

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

Parameters
scope current scope
seqLenMax Maximum time length actually used by this input. Outputs are padded with zeros beyond this length.
x The sequence input to the LSTM, shape (timelen, batch_size, num_inputs).
csPrev Value of the initial cell state.
hPrev Initial output of cell (to be used for peephole).
w The weight matrix.
wci The weight matrix for input gate peephole connection.
wcf The weight matrix for forget gate peephole connection.
wco The weight matrix for output gate peephole connection.
b The bias vector.
i The input gate over the whole time sequence.
cs The cell state before the tanh over the whole time sequence.
f The forget gate over the whole time sequence.
o The output gate over the whole time sequence.
ci The cell input over the whole time sequence.
co The cell after the tanh over the whole time sequence.
h The output h vector over the whole time sequence.
csGrad The current gradient of cs.
hGrad The gradient of h vector.
usePeephole Whether to use peephole weights.
Returns
  • a new instance of BlockLSTMGrad

public Output <T> csPrevGrad ()

The gradient of cs_prev to be back-propped.

public Output <T> hPrevGrad ()

The gradient of h_prev to be back-propped.

public Output <T> wGrad ()

The gradient for w to be back-propped.

public Output <T> wcfGrad ()

The gradient for wcf to be back-propped.

public Output <T> wciGrad ()

The gradient for wci to be back-propped.

public Output <T> wcoGrad ()

The gradient for wco to be back-propped.

public Output <T> xGrad ()

The gradient of x to be back-propped.