(epoch)
| 50 | """ |
| 51 | if opt.lr_policy == 'linear': |
| 52 | def lambda_rule(epoch): |
| 53 | lr_l = 1.0 - max(0, epoch + opt.epoch_count - opt.n_epochs) / float(opt.n_epochs_decay + 1) |
| 54 | return lr_l |
| 55 | scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lambda_rule) |
| 56 | elif opt.lr_policy == 'step': |
| 57 | scheduler = lr_scheduler.StepLR(optimizer, step_size=opt.lr_decay_iters, gamma=0.1) |
nothing calls this directly
no outgoing calls
no test coverage detected