Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resume training problem #11

Open
Roujack opened this issue Oct 7, 2020 · 0 comments
Open

resume training problem #11

Roujack opened this issue Oct 7, 2020 · 0 comments

Comments

@Roujack
Copy link

Roujack commented Oct 7, 2020

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant