You can just use the entire result of the lstm output and use that as input to your loss function
# Evaluate the batch
cnn_output = torch.cat([cnn(sequence) for sequence in images], 0)
lstm_output= lstm(cnn_output)

# Calculate the loss of the batch
loss = loss_function(lstm_output, label)

Where the return of your lstm should look like this:
# Fully connected layers
out = self.fc1(out)
out = self.relufc1(out)
out = self.fc2(out)

Instead of only taking the last output
# Fully connected layers
out = self.fc1(out[:, -1, :]) # just want last time step hidden states! 
out = self.relufc1(out)
out = self.fc2(out)