Skip to content

Commit

Permalink
can observe lr
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Nov 29, 2020
1 parent 7ccc860 commit a395291
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pytorch_trainer/training/extensions/value_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ def observe_lr(optimizer_name='main', observation_key='lr'):
"""
return observe_value(
observation_key,
lambda trainer: trainer.updater.get_optimizer(optimizer_name).lr)
lambda trainer: trainer.updater.get_optimizer(optimizer_name).param_groups[0]["lr"])
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='pytorch-trainer',
version='1.3.0',
version='1.3.1',
packages=find_packages(),
url='https://github.com/Hiroshiba/pytorch-trainer',
author='Kazuyuki Hiroshiba',
Expand Down

0 comments on commit a395291

Please sign in to comment.