LSTMBlockCellGrad

public final class LSTMBlockCellGrad

Computes the LSTM cell backward propagation for 1 timestep.

This implementation is to be used in conjunction of LSTMBlockCell.

Public Methods

static <T extends Number> LSTMBlockCellGrad<T>
create(Scope scope, 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> csGrad, Operand<T> hGrad, Boolean usePeephole)
Factory method to create a class wrapping a new LSTMBlockCellGrad operation.
Output<T>
csPrevGrad()
The gradient of cs to be back-propped.
Output<T>
dicfo()
The derivative wrt to [i, cs, f, o].
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.

Inherited Methods

Public Methods

public static LSTMBlockCellGrad<T> create (Scope scope, 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> csGrad, Operand<T> hGrad, Boolean usePeephole)

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

Parameters
scope current scope
x The input to the LSTM cell, shape (batch_size, num_inputs).
csPrev The previous cell state.
hPrev The previous h state.
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.
cs The cell state before the tanh.
f The forget gate.
o The output gate.
ci The cell input.
co The cell after the tanh.
csGrad The current gradient of cs.
hGrad The gradient of h vector.
usePeephole Whether the cell uses peephole connections.
Returns
  • a new instance of LSTMBlockCellGrad

public Output<T> csPrevGrad ()

The gradient of cs to be back-propped.

public Output<T> dicfo ()

The derivative wrt to [i, cs, f, o].

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.