aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/slim
diff options
context:
space:
mode:
authorGravatar Alexandre Passos <apassos@google.com>2018-06-25 12:39:33 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-06-25 12:43:56 -0700
commitaedd096b83886e0ea99611cc5488284a98fb9b01 (patch)
treeffff736b60b3b6edc7965d15422a7a15021b1618 /tensorflow/contrib/slim
parentadc03426f11e7d22dca8ee59146423eb4d9668eb (diff)
Uses resource variables by default for the global step.
Relnotes: hooks will now see deterministically the value of the global step before updating instead of the value after updating. PiperOrigin-RevId: 202000826
Diffstat (limited to 'tensorflow/contrib/slim')
-rw-r--r--tensorflow/contrib/slim/python/slim/learning_test.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tensorflow/contrib/slim/python/slim/learning_test.py b/tensorflow/contrib/slim/python/slim/learning_test.py
index 831c6e427a..6bd55e7a24 100644
--- a/tensorflow/contrib/slim/python/slim/learning_test.py
+++ b/tensorflow/contrib/slim/python/slim/learning_test.py
@@ -520,8 +520,6 @@ class TrainTest(test.TestCase):
run_root = glob.glob(os.path.join(dump_root, 'run_*'))[-1]
dump = debug_data.DebugDumpDir(run_root)
- self.assertAllEqual(0,
- dump.get_tensors('global_step', 0, 'DebugIdentity')[0])
def testTrainWithTrace(self):
logdir = os.path.join(
@@ -547,7 +545,7 @@ class TrainTest(test.TestCase):
log_every_n_steps=10,
trace_every_n_steps=100)
self.assertIsNotNone(loss)
- for trace_step in [1, 101, 201]:
+ for trace_step in [0, 100, 200]:
trace_filename = 'tf_trace-%d.json' % trace_step
self.assertTrue(os.path.isfile(os.path.join(logdir, trace_filename)))