Solved by ptrblck in post #2 
              
              
                hidden has the shape [num_layers * num_directions, batch, hidden_size]. 
Since you are slicing it in dim0 and concatenating in dim1 here: 
x = torch.cat((hidden[-2, :, :], hidden[-1, :, :]), dim=1)

the output shape of x will be [batch_size=32, 60], so you would need to increase the in_features of s…