T
- data type for xGrad()
outputpublic final class BlockLSTMGrad<T extends Number> extends PrimitiveOp
This implementation is to be used in conjunction of LSTMBlock.
operation
Modifier and Type | Method and Description |
---|---|
Output<T> |
bGrad()
The gradient for w to be back-propped.
|
static <T extends Number> |
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> |
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> |
wGrad()
The gradient for w to be back-propped.
|
Output<T> |
xGrad()
The gradient of x to be back-propped.
|
equals, hashCode, op, toString
public 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)
scope
- current scopeseqLenMax
- 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.Copyright © 2022. All rights reserved.