diff options
Diffstat (limited to 'tensorflow/python/kernel_tests/variables_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/variables_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/python/kernel_tests/variables_test.py b/tensorflow/python/kernel_tests/variables_test.py index fa7071d042..38c84cdef1 100644 --- a/tensorflow/python/kernel_tests/variables_test.py +++ b/tensorflow/python/kernel_tests/variables_test.py @@ -366,6 +366,14 @@ class VariablesTestCase(tf.test.TestCase): for i in v2.initializer.inputs: self.assertEqual(expected_group_v2, i.op.colocation_groups()) + def testLoad(self): + with self.test_session(): + var = tf.Variable(np.zeros((5,5), np.float32)) + tf.global_variables_initializer().run() + var.load(np.ones((5, 5), np.float32)) + + self.assertAllClose(np.ones((5, 5), np.float32), var.eval()) + class IsInitializedTest(tf.test.TestCase): |