Mask-ShadowGAN icon indicating copy to clipboard operation
Mask-ShadowGAN copied to clipboard

resume training problem

Open Roujack opened this issue 4 years ago • 0 comments

Hi, I've try continue training from a checkpoint, and after several epoches the loss become very large(larger than 1w). I find that the learning rate of resume training is a value less than 0, which causes the above problem. I think the solution is to set the offset parameter of lambdaLR to 0. the relative code is: train_Mask-ShadowGAN.py: line 97-101:

lr_scheduler_G = torch.optim.lr_scheduler.LambdaLR(optimizer_G,lr_lambda=LambdaLR(opt.n_epochs, 0, opt.decay_epoch).step)
lr_scheduler_D_A = torch.optim.lr_scheduler.LambdaLR(optimizer_D_A,lr_lambda=LambdaLR(opt.n_epochs, 0, opt.decay_epoch).step)
lr_scheduler_D_B = torch.optim.lr_scheduler.LambdaLR(optimizer_D_B,lr_lambda=LambdaLR(opt.n_epochs, 0,opt.decay_epoch).step)

Roujack avatar Oct 07 '20 04:10 Roujack