A DLPy LSTM model is built for time series anomaly detection. The Recurrent() layer is created with rnn_type='LSTM' and output_type='ENCODING'. What does output_type='ENCODING' return?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal — with output_type='ENCODING', you get only the final hidden state vector after the LSTM has processed the whole sequence. That vector is a compressed summary of the sequence, so you can score the sequence as a single anomaly value.
Full Explanation
Only the final hidden state vector representing the entire sequence's compressed representation, discarding intermediate time step outputs, is correct. In DLPy's Recurrent() layer, output_type='ENCODING' returns a fixed-length vector summarizing the whole input sequence after all time steps have been processed, useful for sequence classification or anomaly scoring where a single score per sequence is needed. The option saying the prediction output at every time step in the input sequence describes output_type='SAMELENGTH'. The option saying a one-hot encoded representation of the most likely next token in the sequence describes a next-token prediction head, typically a softmax output, not the Recurrent layer's encoding output. The option saying the attention-weighted sum of all hidden states describes an attention mechanism, not LSTM encoding.