Solved by tom in post #2 
              
              
                I would probably just add the losses like this: 
loss = 0
for i in range(noOfModels):
    loss = loss + criterion(outputs[:,:,i], x)
loss.backward()

for i in range(noOfModels):
    optimizer[i].step()

This should work if you didn’t break the computational graph somewhere.