Small code simplification
Closes
@@ -281,7 +281,7 @@ def adafactor_decay_rate_adam(beta2):
Returns:
a scalar
"""
- t = tf.cast(tf.train.get_or_create_global_step(), tf.float32) + 1.0
+ t = _step_num() + 1.0
decay = beta2 * (1.0 - tf.pow(beta2, t - 1.0)) / (1.0 - tf.pow(beta2, t))
# decay = tf.cond(tf.equal(t, 1.0), lambda: beta2, lambda: decay)
return decay
