aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/training/slot_creator_test.py
diff options
context:
space:
mode:
authorGravatar Illia Polosukhin <ipolosukhin@google.com>2016-11-03 14:46:06 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-03 16:09:01 -0700
commitcbd3cacfb73bbea912b9d01c2540187684f751a7 (patch)
treec2c22af2d05583491b1370dcabdb2e83cb61e2ee /tensorflow/python/training/slot_creator_test.py
parent703fce57eaae725c4ae4b0bd23629c4f04a9de16 (diff)
Replace usages initialize_all_variables -> global_variables_initializer
Change: 138128703
Diffstat (limited to 'tensorflow/python/training/slot_creator_test.py')
-rw-r--r--tensorflow/python/training/slot_creator_test.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/python/training/slot_creator_test.py b/tensorflow/python/training/slot_creator_test.py
index 4e2b980751..8302275e7b 100644
--- a/tensorflow/python/training/slot_creator_test.py
+++ b/tensorflow/python/training/slot_creator_test.py
@@ -28,7 +28,7 @@ class SlotCreatorTest(tf.test.TestCase):
v = tf.Variable([1.0, 2.5], name="var")
slot = slot_creator.create_slot(v, v.initialized_value(), name="slot")
- tf.initialize_all_variables().run()
+ tf.global_variables_initializer().run()
self.assertEqual(slot.op.name, "var/slot")
self.assertEqual(slot.get_shape().as_list(), [2])
@@ -40,7 +40,7 @@ class SlotCreatorTest(tf.test.TestCase):
v = tf.constant([1.0, 2.5], name="const")
slot = slot_creator.create_slot(v, v * 2, name="slot")
- tf.initialize_all_variables().run()
+ tf.global_variables_initializer().run()
self.assertEqual(slot.op.name, "const/slot")
self.assertEqual(slot.get_shape().as_list(), [2])
@@ -53,7 +53,7 @@ class SlotCreatorTest(tf.test.TestCase):
with tf.control_dependencies(None):
slot = slot_creator.create_zeros_slot(v, name="slot", dtype=tf.float64)
- tf.initialize_all_variables().run()
+ tf.global_variables_initializer().run()
self.assertEqual(slot.op.name, "var/slot")
self.assertEqual(slot.get_shape().as_list(), [2])
@@ -66,7 +66,7 @@ class SlotCreatorTest(tf.test.TestCase):
with tf.control_dependencies(None):
slot = slot_creator.create_zeros_slot(v, name="slot")
- tf.initialize_all_variables().run()
+ tf.global_variables_initializer().run()
self.assertEqual(slot.op.name, "const/slot")
self.assertEqual(slot.get_shape().as_list(), [2])