Skip to content

Commit

Permalink
Add lr_lower_boundary to fix #19
Browse files Browse the repository at this point in the history
  • Loading branch information
carpedm20 committed Apr 30, 2017
1 parent d8ca38c commit 458eb68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def add_argument_group(name):
train_arg.add_argument('--lr_update_step', type=int, default=100000, choices=[100000, 75000])
train_arg.add_argument('--d_lr', type=float, default=0.00008)
train_arg.add_argument('--g_lr', type=float, default=0.00008)
train_arg.add_argument('--lr_lower_boundary', type=float, default=0.00002)
train_arg.add_argument('--beta1', type=float, default=0.5)
train_arg.add_argument('--beta2', type=float, default=0.999)
train_arg.add_argument('--gamma', type=float, default=0.5)
Expand Down
4 changes: 2 additions & 2 deletions trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def __init__(self, config, data_loader):
self.g_lr = tf.Variable(config.g_lr, name='g_lr')
self.d_lr = tf.Variable(config.d_lr, name='d_lr')

self.g_lr_update = tf.assign(self.g_lr, self.g_lr * 0.5, name='g_lr_update')
self.d_lr_update = tf.assign(self.d_lr, self.d_lr * 0.5, name='d_lr_update')
self.g_lr_update = tf.assign(self.g_lr, tf.maximum(self.g_lr * 0.5, config.lr_lower_boundary), name='g_lr_update')
self.d_lr_update = tf.assign(self.d_lr, tf.maximum(self.d_lr * 0.5, config.lr_lower_boundary), name='d_lr_update')

self.gamma = config.gamma
self.lambda_k = config.lambda_k
Expand Down

0 comments on commit 458eb68

Please sign in to comment.