diff options
author | 2016-11-03 14:46:06 -0800 | |
---|---|---|
committer | 2016-11-03 16:09:01 -0700 | |
commit | cbd3cacfb73bbea912b9d01c2540187684f751a7 (patch) | |
tree | c2c22af2d05583491b1370dcabdb2e83cb61e2ee /tensorflow/python/kernel_tests/embedding_ops_test.py | |
parent | 703fce57eaae725c4ae4b0bd23629c4f04a9de16 (diff) |
Replace usages initialize_all_variables -> global_variables_initializer
Change: 138128703
Diffstat (limited to 'tensorflow/python/kernel_tests/embedding_ops_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/embedding_ops_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/python/kernel_tests/embedding_ops_test.py b/tensorflow/python/kernel_tests/embedding_ops_test.py index d43fbbbf40..67199cecdd 100644 --- a/tensorflow/python/kernel_tests/embedding_ops_test.py +++ b/tensorflow/python/kernel_tests/embedding_ops_test.py @@ -55,7 +55,7 @@ class ScatterAddSubTest(tf.test.TestCase): ind = tf.constant(indices, dtype=tf.int32) p2 = scatter_op(p, ind, vals, name="updated_p") # p = init - tf.initialize_all_variables().run() + tf.global_variables_initializer().run() # p += vals result = p2.eval() # Compute the expected 'p' using numpy operations. @@ -239,7 +239,7 @@ class EmbeddingLookupTest(tf.test.TestCase): ids = tf.constant(list(id_vals), dtype=tf.int32) print("Construct ids", ids.get_shape()) embedding = tf.nn.embedding_lookup(p_variable, ids) - tf.initialize_all_variables().run() + tf.global_variables_initializer().run() params_values = [params[p_i.name] for p_i in p] # Test that the PartitionedVariable components equal the list in p p_var_val = sess.run(list(p_variable)) @@ -333,7 +333,7 @@ class EmbeddingLookupTest(tf.test.TestCase): # will test that aspect. id_vals = np.random.randint(vocab_size, size=num_vals) ids = tf.constant(list(id_vals), dtype=tf.int32) - tf.initialize_all_variables().run() + tf.global_variables_initializer().run() embedding = tf.nn.embedding_lookup( p_variable, ids, partition_strategy="div") tf_result = embedding.eval(feed_dict=feed_dict) |