Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6c0be32
Update lr_scheduler.py
AutuanLiu Mar 30, 2018
d1867a6
Update lr_scheduler.py
AutuanLiu Mar 30, 2018
df96d22
Update lr_scheduler.py
AutuanLiu Mar 30, 2018
2e4da57
Update lr_scheduler.py
AutuanLiu Mar 30, 2018
aae78c1
Update lr_scheduler.py
AutuanLiu Mar 30, 2018
cab7a44
Update lr_scheduler.py
AutuanLiu Mar 30, 2018
ab48241
Merge remote-tracking branch 'upstream/master'
AutuanLiu Mar 31, 2018
c3d6471
add test
AutuanLiu Mar 31, 2018
e55f394
fix test error
AutuanLiu Apr 1, 2018
cbfc3ed
fix test error
AutuanLiu Apr 1, 2018
866af45
fix test errors
AutuanLiu Apr 1, 2018
5696ad7
indent error fix
AutuanLiu Apr 1, 2018
49f80e4
indent error fix
AutuanLiu Apr 1, 2018
885ce31
fix indent error
AutuanLiu Apr 1, 2018
11db9b0
indent
AutuanLiu Apr 1, 2018
c5e2acf
under indent fix
AutuanLiu Apr 1, 2018
ba7ed20
"
AutuanLiu Apr 1, 2018
c0ff4fe
indent
AutuanLiu Apr 1, 2018
92e47ef
Update lr_scheduler.py
AutuanLiu Apr 2, 2018
7784c7f
Update lr_scheduler.py
AutuanLiu Apr 2, 2018
8a17faf
Update test_optim.py
AutuanLiu Apr 2, 2018
2963ddc
Update lr_scheduler.py
AutuanLiu Apr 2, 2018
3c129ee
fix test errors
AutuanLiu Apr 3, 2018
5abc737
fix CI errors
AutuanLiu Apr 3, 2018
db084bd
fix test errors
AutuanLiu Apr 3, 2018
2576f49
fix test errors
AutuanLiu Apr 3, 2018
8b1b4c2
Update lr_scheduler.py
AutuanLiu Apr 3, 2018
82f9a2f
update
AutuanLiu Apr 4, 2018
889d6c5
Merge remote-tracking branch 'upstream/master' into warm_restart
AutuanLiu Apr 4, 2018
b0e4385
Merge remote-tracking branch 'upstream/master'
AutuanLiu Apr 4, 2018
6ba3eb9
Merge branches 'master' and 'warm_restart' of github.com:AutuanLiu/py…
AutuanLiu Apr 11, 2018
67d26cc
update
AutuanLiu Apr 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
indent error fix
  • Loading branch information
AutuanLiu committed Apr 1, 2018
commit 49f80e4a71d3bf4e7f209b8445751d625a259e82
3 changes: 1 addition & 2 deletions torch/optim/lr_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ def __init__(self, optimizer, T_max, eta_min=0, T_mult=2, restart=False, last_ep
super(CosineAnnealingLR, self).__init__(optimizer, last_epoch)

def get_lr(self):
new_lrs = [self.eta_min + (base_lr - self.eta_min) * (1 + math.cos(math.pi * self.last_epoch / self.T_max)) / 2
for base_lr in self.base_lrs]
new_lrs = [self.eta_min + (base_lr - self.eta_min) * (1 + math.cos(math.pi * self.last_epoch / self.T_max)) / 2 for base_lr in self.base_lrs]
if self.restart and self.last_epoch == self.T_max:
self.last_epoch = 0
self.T_max *= self.T_mult

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Expand Down