Method LSTM
LSTM(TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorInt, TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorFloat, TensorFloat, RnnDirection, RnnActivation[], float[], float[], bool, float, RnnLayout)
Generates an output tensor by computing a one-layer long short-term memory (LSTM) on an input tensor.
Declaration
void LSTM(TensorFloat X, TensorFloat W, TensorFloat R, TensorFloat B, TensorInt sequenceLens, TensorFloat initialH, TensorFloat initialC, TensorFloat P, TensorFloat Y, TensorFloat Yh, TensorFloat Yc, RnnDirection direction, RnnActivation[] activations, float[] activationAlpha, float[] activationBeta, bool inputForget, float clip, RnnLayout layout)
Parameters
Type | Name | Description |
---|---|---|
TensorFloat | X | The input sequences tensor. |
TensorFloat | W | The weights tensor for the gates of the LSTM. |
TensorFloat | R | The recurrent weights tensor for the gates of the LSTM. |
TensorFloat | B | The optional bias tensor for the input gate of the LSTM. |
TensorInt | sequenceLens | The optional 1D tensor specifying the lengths of the sequences in a batch. |
TensorFloat | initialH | The optional initial values tensor of the hidden neurons of the LSTM. If this is |
TensorFloat | initialC | The optional initial values tensor of the cells of the LSTM. If this is |
TensorFloat | P | The optional weight tensor for the peepholes of the LSTM. If this is |
TensorFloat | Y | The output tensor to be computed and filled with the concatenated intermediate output values of the hidden. |
TensorFloat | Yh | The output tensor to be computed and filled with the last output value of the hidden. |
TensorFloat | Yc | The output tensor to be computed and filled with the last output value of the cell. |
RnnDirection | direction | The direction of the LSTM as an |
RnnActivation[] | activations | The activation functions of the LSTM as an array of |
float[] | activationAlpha | The alpha values of the activation functions of the LSTM. |
float[] | activationBeta | The beta values of the activation functions of the LSTM. |
bool | inputForget | Whether to forget the input values in the LSTM. If this is |
float | clip | The cell clip threshold of the LSTM. |
RnnLayout | layout | The layout of the tensors as an |