These are the shapes that are going in and coming out of my architecture
Before applying your suggestion to reshape my output.
1. LSTM Input : torch.Size([1, 5, 2])
2. LSTM output : torch.Size([1, 5, 100])
3. FC layer input :  torch.Size([5,100])
4. FC layer output : torch.Size([5,2])

After applying your suggestion to reshape my LSTM output.
input to LSTM:  torch.Size([1, 5, 2])
Output of LSTM:  torch.Size([1, 5, 100])
Input to FC layer:  torch.Size([1, 500])
Output of FC layer:  torch.Size([1, 2])

According to this 1 post, my output shapes when using out = out.contiguous().view(-1, self.hidden_dim) from architecture seem right.
When I applied your suggested code I got the following error
ValueError: Expected input batch_size (1) to match target batch_size (2).