mchong6/GANsNRoses

About D_L in the code

Closed this issue · 2 comments

Thanks for the great work, the code seems didn't add D_L to train()?

def train(args, trainA_loader, trainB_loader, testA_loader, testB_loader, G_A2B, G_B2A, D_A, D_B, G_optim, D_optim, device):
    G_A2B.train(), G_B2A.train(), D_A.train(), D_B.train() 

By default upon initialization, D_L will be in train mode. During eval, only the generators are put to eval mode, thus, we need to set them back to train mode in the train function. Thus discriminators do not have to be manually put to train mode. In fact, in fact, this is true for D_A to D_B too.

THX