Solved by antoniogois in post #6 
              
              
                ok, I’ve written a self-contained example to illustrate my point  (I couldn’t make it smaller than this) 
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn import Embedding, LSTM
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
torch.manual_seed…