Multi branch input CNN to LSTM for 1D data

i’m trying to implement multi branch Network (CNN) where each branch is inserted with 1D data of different size and later concatenate outputs together and pass to LSTM model for prediction. I’m kind of beginner, and there is not much helpful material available related to PyTorch, so kindly help me.

train_load_1 = DataLoader(dataset=train_dataset_1, batch_size=100, shuffle=False)
train_load_2 = DataLoader(dataset=train_dataset_2, batch_size=100, shuffle=False)
train_load_3 = DataLoader(dataset=train_dataset_3, batch_size=100, shuffle=False)

test_load_1 = DataLoader(dataset=test_dataset_1, batch_size=100, shuffle=True)
test_load_2 = DataLoader(dataset=test_dataset_2, batch_size=100, shuffle=True)
test_load_3 = DataLoader(dataset=test_dataset_3, batch_size=100, shuffle=True)

class Net(nn.Module): 
   def __init__(self):
      super(Net, self).__init__()
      self.conv = nn.Conv1d( ... )  
      self.fc1 = nn.Linear( ... )  
      self.fc2 = nn.Linear( ... )  

   def forward(self, x1, x2, x3): 
      o1 = self.conv(x1)
      o2 = self.conv(x2)
      o3 = self.conv(x3)
      combined =, -1),
                            o2.view(c.size(0), -1),
                            o3.view(c.size(0), -1)), dim=1)
      out = self.fc1(combined)
      out = self.fc2(out)
      return F.softmax(x, dim=1)

model = Net().to(device)
optimizer = optim.SGD(model.parameters(), lr=0.01)

for epoch in epochs: