ptrblck:

ll backward on both losses separa


Sorry. I was missing one point. If we use seg loss to update generator loss. So the code should be (deleted detach()).
fake_A= GenA(real_A)
lossGen=L1(real_A, fake_A)
# Feed fake_A to SegA
pred_A= SegA(fake_A)
lossSeg = cross_entropy(pred_A, label)
loss = lossSeg + lossGen
loss.backward()