Hello,
I would like to ask how can I obtain the memory states outputs (not hidden states) of each cell in an LSTM when using pack padded sequence?
For example, this code extracts the hidden states:
 packed_embedded = pack_padded_sequence(embedded, 
                                        src_len, 
                                        batch_first = True,
                                        enforce_sorted = False) # or sort then set to true (default: true)
        
 packed_outputs, hidden = self.lstm_encoder(packed_embedded)  #hidden of shape (batch_size, 2, hidden_size)

I would like my packed_outputs to be from the memory state not from the hidden state. Is there any way to do this?
Thanks!