Solved by ptrblck in post #5 
              
              
                I’ve created a small example here: 
batch_size = 64
embedding_dim = 200
vocabulary_size = 100
sentence_len = 80
out_channel = 100

embedding = nn.Embedding(vocabulary_size, embedding_dim)
conv1 = nn.Conv1d(embedding_dim, out_channel, kernel_size=2)

x = torch.empty(batch_size, sentence_len, dtype=to…