Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- replace
- for param_group in optimizer.param_groups:
- param_group['lr'] = learning_rate
- with
- decay_start = 25000
- A_ = 1e-3
- B_ = 8000
- C_ = 1e-5
- if iteration < decay_start:
- learning_rate = A_
- else:
- iteration_adjusted = iteration - decay_start
- learning_rate = (A_*(e**(-iteration_adjusted/B_))) + C_ # y = Ae^(-x/B) + C
- for param_group in optimizer.param_groups:
- param_group['lr'] = learning_rate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement