I did a question matching task in keras, it has two input for two similar question.
Lets named them q,q’
I have two lstm that q and q’ are  passing from both of them,in this way:
q----->embedding----->lstm1----->lstm2—>result:sum_a
q’----->embedding----->lstm1----->lstm2—>result:sum_b
Ok?
So then the models output should be two arg:

the q’ result (sum_a)
Dot product of sum_a and sum_b

So it is the explanation in LSTM term of keras…
And:
In second BiLSTM model we have just one bilstm layer ofter embedding
q----->embedding----->bilstm—>result:sum_a
q’----->embedding----->bilstm1—>result:sum_b
and again the models output should be two arg:

the q’ result (sum_a)
Dot product of sum_a and sum_b

This was an another BILSTM explanation,
can you help about this two in torch?