Skip to content

Commit

Permalink
Update main.py (pytorch#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Junonia authored and soumith committed Jan 30, 2017
1 parent b59153a commit 832141b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagenet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def update(self, val, n=1):
def adjust_learning_rate(optimizer, epoch):
"""Sets the learning rate to the initial LR decayed by 10 every 30 epochs"""
lr = args.lr * (0.1 ** (epoch // 30))
for param_group in optimizer.state_dict()['param_groups']:
for param_group in optimizer.param_groups:
param_group['lr'] = lr


Expand Down

0 comments on commit 832141b

Please sign in to comment.