Thank you!
So if I have something like that
class NeuralNet2(nn.Module):
def init(self):
super(NeuralNet2, self).init()
    self.input = nn.Linear(2, 40)
    self.hiddenLeft = nn.Linear(40, 2)
    self.hiddenRight = nn.Linear(40, 2)
    self.out = nn.Linear(4, 6)

def forward(self, x):

    x = self.input(x)
    xLeft, xRight = torch.sigmoid(self.hiddenLeft(x)), torch.sigmoid(self.hiddenRight(x))
    x = torch.cat((xLeft, xRight), 2)
    x = F.sigmoid(self.out(x))

    return x

Is it necessary to re-implement the backward? Or how would it work in this case?