Hello,
I want to implement many-to-one LSTM model class in PyTorch (as shown in image).  When found some code from internet I couldn’t understand(manage) inputs and outputs of the model…
In short: How can I implement LSTM class model like shown in image…?   (Could you write some simple example code, or …)

lstm.png966×372 38.9 KB

Before LSTM I want to use Encoder and after LSTM I want to use Decoder, that’s why I need exact size of input and outputs like shown above image…