vdw:

    last_h = h[-1] # Here the [-1] is not because of the sequence but because of the num_layers



So this solution is a way of getting the “many to one” output, correct?
And this works because the final element of the final hidden state is equal to the final element of the output tensor? That diagram you sent me was helpful.
That would give the correct shape of (batch_size, hidden_size) = (1, 100). I think I get it!
Okay, but…
What if I wanted to do a sequence input to sequence output? More like in the NLP Udacity example.
In this case, my LSTM output would have shape (1, 12, 100) if batch_first=True.
out, hs = self.lstm(x, hs)
out = out.view(1, -1) 

# gives shape (batch_size, "something") = (1, 1200) 

So that would not work, because the fully connected layer needs input shaped like (batch_size, hidden_size)
Instead, if I do this:
out, hs = self.lstm(x, hs)
out.reshape(-1, self.hidden_size)

# gives shape (12, 100), which works with FC layer.

But would this be correct, seeing as how we are artificially making a new batch_size = 12, just for the final FC layer?
Or, should I redefine my nn.Linear() layer:
self.fc = nn.Linear(hidden_size * seq_length, output_size)?

Where output_size =  12 if I want a sequence output.