- 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, aclnnBidirectionLSTMGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnBidirectionLSTM is called to perform computation.
[object Object]
[object Object]
Parameters:
[object Object]Returns:
[object Object]: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]- Deterministic compute:
- aclnnBidirectionLSTM defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]