(epoch)
| 120 | def _get_scheduler(self, optimizer, opt): |
| 121 | if opt.lr_policy == 'lambda': |
| 122 | def lambda_rule(epoch): |
| 123 | lr_l = 1.0 - max(0, epoch + 1 + opt.epoch_count - opt.niter) / float(opt.niter_decay + 1) |
| 124 | return lr_l |
| 125 | scheduler = lr_scheduler.LambdaLR(optimizer, lr_lambda=lambda_rule) |
| 126 | elif opt.lr_policy == 'step': |
| 127 | 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