I am working on a relation extraction task between two entities in a sentence.
For the model, I want to use Bi-LSTM model that takes three different parts of a sentence as a input:

Left of the first entity 2. Right of the second entity 3. text between the two entities.

In Keras, it seems that you create a separate LSTM for each of the input and concatenate all three using Concatenate as below.
 left_ph = Input((None,), dtype="string")
 bet_ph = Input((None,), dtype="string")
 right_ph = Input((None,), dtype="string")
 left_embs = bilstm(left_ph, rnn_state_size, num_buckets, embed_dim)
 bet_embs = bilstm(bet_ph, rnn_state_size, num_buckets, embed_dim)
 right_embs = bilstm(right_ph, rnn_state_size, num_buckets, embed_dim)
 layer = Concatenate(1)([left_embs, bet_embs, right_embs])

Since i’m new to Pytorch, i was wondering if there’s an approach to utilize multiple sentences in Bi-LSTM model for text-classification purpose.