Nelson Liu's Blog

pytorch

Extracting last timestep outputs from PyTorch RNNs

Here's some code I've been using to extract the last hidden states from an RNN with variable length input....