You can do:
nb_branches = 3

# Assuming you are in a nn.Module
self.encoders = nn.ModuleList()
for i in range(nb_branches):
  self.encoders.append(Encode())

def forward(self, x):
  y_final = 0
  for encoder in self.encoders:
    y_final += encoder(x)