"docs/vscode:/vscode.git/clone" did not exist on "0f55643c59ec6236043cfb7a039d64fcdd4b4b73"
Commit bae940dc authored by Haoyu Zhang's avatar Haoyu Zhang Committed by Toby Boyd
Browse files

Fix broken test in V2 (#6755)

parent 4b4dbad1
......@@ -120,9 +120,10 @@ class PiecewiseConstantDecayWithWarmup(
def _get_learning_rate(self, step):
"""Compute learning rate at given step."""
with tf.name_scope(self.name, 'PiecewiseConstantDecayWithWarmup', [
self.rescaled_lr, self.step_boundaries, self.lr_values,
self.warmup_steps, self.compute_lr_on_cpu]):
with tf.compat.v1.name_scope(self.name, 'PiecewiseConstantDecayWithWarmup',
[self.rescaled_lr, self.step_boundaries,
self.lr_values, self.warmup_steps,
self.compute_lr_on_cpu]):
def warmup_lr(step):
return self.rescaled_lr * (
tf.cast(step, tf.float32) / tf.cast(self.warmup_steps, tf.float32))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment