I have tried to code this, but this is as far as I got. I am not sure how to determine the input and output dimension of concat_layer. Also, what goes in the forward function under lstms?
Any help is greatly appreciated.
class Net(torch.nn.Module):
    def __init__(self):

        super(Net, self).__init__()
        self.lstm1 = torch.nn.LSTM(input_size = 1, hidden_size = 2, num_layers = 1, batch_first = True)
        self.lstm2 = torch.nn.LSTM(input_size = 1, hidden_size = 2, num_layers = 1, batch_first = True)
        self.lstm3 = torch.nn.LSTM(input_size = 1, hidden_size = 2, num_layers = 1, batch_first = True)
        self.concat_layer = torch.nn.Linear(?, ?)
        self.linear = torch.nn.Linear(,1)

    def forward(self, x):

        lstm1 = ?
        lstm2 = ?
        lstm3 = ?
        concat = torch.cat((lstm1, lstm2, lstm3), dim=1)
        output = self.linear(concat)
        return output