- Description: Implements the long short-term memory (LSTM) network, which is a special recurrent neural network (RNN) model. Computes the LSTM network, receives the input sequence and initial state, and returns the output sequence and final state.
- Formula:
- : input vector to the LSTM unit.
- : activation vector of the forget gate.
- : activation vector of the input/update gate.
- : activation vector of the output gate.
- : hidden state vector, also known as output vector of the LSTM unit.
- : cell input activation vector.
- : cell state vector.
- : weight matrices and bias vector parameters which need to be learned during training.
Each operator has calls. First, [object Object] is called to obtain the input parameters and compute the required workspace size based on the process. Then, [object Object] is called to perform computation.
[object Object]
[object Object]
Parameters
[object Object][object Object][object Object][object Object]Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
- Deterministic computation:
- The aclnnLSTM is implemented in deterministic mode by default.
- All inputs and outputs support the FLOAT16 and FLOAT32 types, and their data types must be the same.
The following example is for reference only. For details, see .
[object Object]