Solved by ptrblck in post #4 
              
              
                Yes, nn.Linear expects the batch dimension to be in dim0. 
However, in the tutorial you are either providing the input letter by letter (thus the seq_len is missing) or you are slicing the encoded word tensor, so that again the seq_len dimension will be missing. 
Here are the example cells: 
input =…