It depends what data in your batch exactly refers to. Since you want to push it through I LSTM, I assume that data contains some sequence somewhere. If so, it really depends on the content/structure of data.
Or do you have a sequence of, say, 32 frames of a video clip you first encode and then push these 32 frames as a sequence through an LSTM. In this case, batch_size for the visual encoding becomes your seq_len for the LSTM with a batch_size=1. So you don’t need to reshape anything but “unsqueeze” your batch dimension. Say h is your batch after visual encoding with shape (32, data). Then you can do:
h = h.unsqueeze(0)

resulting in shape of (1, 32, data) which works just fine as input for your LSTM.