aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/examples
diff options
context:
space:
mode:
authorGravatar Alexandre Passos <apassos@google.com>2018-07-18 10:16:16 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-18 10:22:51 -0700
commit9cc29a75ce8131db67b48e92dac3c16a255b92ed (patch)
tree73bf7a7483d8f7ae3872437609b6943218938ff4 /third_party/examples
parent491b2d61156333c44e6bf06e2ac0a7ac02c4d310 (diff)
Allows constructing resource variables from tf.Variable.
Also adds arguments to control distributed aggregation to the tf.Variable constructor. Removes tfe.Variable from examples as it's now unnecessary. PiperOrigin-RevId: 205096552
Diffstat (limited to 'third_party/examples')
-rw-r--r--third_party/examples/eager/spinn/spinn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/third_party/examples/eager/spinn/spinn.py b/third_party/examples/eager/spinn/spinn.py
index 67456a5bdf..c242ef3fdd 100644
--- a/third_party/examples/eager/spinn/spinn.py
+++ b/third_party/examples/eager/spinn/spinn.py
@@ -419,7 +419,7 @@ class SNLIClassifierTrainer(tfe.Checkpointable):
# Create a custom learning rate Variable for the RMSProp optimizer, because
# the learning rate needs to be manually decayed later (see
# decay_learning_rate()).
- self._learning_rate = tfe.Variable(lr, name="learning_rate")
+ self._learning_rate = tf.Variable(lr, name="learning_rate")
self._optimizer = tf.train.RMSPropOptimizer(self._learning_rate,
epsilon=1e-6)