See, the issue is here.
Change hidden_dim to 750 instead of 50 so that self.hidden will be 750  in
lstm_out = lstm_out.contiguous().view(-1, self.hidden_dim).
After .view() , the size changes to [480,50], instead it must change to [32,750].
This way, the batch_size  of 32 is maintained.