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 and Infographic
Here's the deal — b is correct because output_type='ENCODING' in DLPy's Recurrent() layer returns only the final hidden state vector after processing all time steps — a fixed-length vector summarizing the entire sequence. This is useful for sequence classification or anomaly scoring where a single score per sequence is needed.
Full explanation below image
Full Explanation
B is correct because output_type='ENCODING' in DLPy's Recurrent() layer returns only the final hidden state vector after processing all time steps — a fixed-length vector summarizing the entire sequence. This is useful for sequence classification or anomaly scoring where a single score per sequence is needed. A (every time step output) would be output_type='SAMELENGTH'. C (next token prediction) requires a softmax output head, not the Recurrent layer itself. D (attention-weighted sum) is an attention mechanism, not LSTM encoding.