Skip to content

Commit

Permalink
Merge pull request #2910 from ken-nakanishi/fix-bug-dependent-on-glib…
Browse files Browse the repository at this point in the history
…c-version

Fix a bug dependent on glibc version
  • Loading branch information
gwtnb committed Jul 3, 2017
2 parents c77d993 + b3698f0 commit f778e43
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chainer/optimizers/adam.py
Expand Up @@ -76,8 +76,8 @@ def update_core_gpu(self, param):

@property
def lr(self):
fix1 = 1. - self.hyperparam.beta1 ** self.t
fix2 = 1. - self.hyperparam.beta2 ** self.t
fix1 = 1. - math.pow(self.hyperparam.beta1, self.t)
fix2 = 1. - math.pow(self.hyperparam.beta2, self.t)
return self.hyperparam.alpha * math.sqrt(fix2) / fix1


Expand Down Expand Up @@ -116,6 +116,6 @@ def create_update_rule(self):

@property
def lr(self):
fix1 = 1. - self.hyperparam.beta1 ** self.t
fix2 = 1. - self.hyperparam.beta2 ** self.t
fix1 = 1. - math.pow(self.hyperparam.beta1, self.t)
fix2 = 1. - math.pow(self.hyperparam.beta2, self.t)
return self.hyperparam.alpha * math.sqrt(fix2) / fix1

0 comments on commit f778e43

Please sign in to comment.