added nn/schedulear NewLRScheduler
This commit is contained in:
parent
42fe023433
commit
d490db3fdf
|
@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
- Added nn/scheduler NewLRScheduler()
|
||||
|
||||
|
||||
## [Nofix]
|
||||
|
|
|
@ -44,6 +44,10 @@ type LRScheduler struct {
|
|||
scheduler scheduler
|
||||
}
|
||||
|
||||
func NewLRScheduler(s scheduler) *LRScheduler {
|
||||
return &LRScheduler{s}
|
||||
}
|
||||
|
||||
// Step updates optimizer learning rate.
|
||||
func (s *LRScheduler) Step(opts ...SchedulerOption) {
|
||||
s.scheduler.SetLRs(opts...)
|
||||
|
|
Loading…
Reference in New Issue
Block a user