diff options
Diffstat (limited to 'tensorflow/python/kernel_tests/identity_n_op_py_test.py')
-rw-r--r-- | tensorflow/python/kernel_tests/identity_n_op_py_test.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tensorflow/python/kernel_tests/identity_n_op_py_test.py b/tensorflow/python/kernel_tests/identity_n_op_py_test.py index 408b173981..518733cd8e 100644 --- a/tensorflow/python/kernel_tests/identity_n_op_py_test.py +++ b/tensorflow/python/kernel_tests/identity_n_op_py_test.py @@ -28,7 +28,7 @@ from tensorflow.python.platform import test class IdentityNOpTest(test.TestCase): def testInt32String_6(self): - with self.test_session() as sess: + with self.cached_session() as sess: [value0, value1] = sess.run( array_ops.identity_n([[1, 2, 3, 4, 5, 6], [b"a", b"b", b"C", b"d", b"E", b"f", b"g"]])) @@ -37,7 +37,7 @@ class IdentityNOpTest(test.TestCase): np.array([b"a", b"b", b"C", b"d", b"E", b"f", b"g"]), value1) def testInt32_shapes(self): - with self.test_session() as sess: + with self.cached_session() as sess: inp0 = constant_op.constant([10, 20, 30, 40, 50, 60], shape=[2, 3]) inp1 = constant_op.constant([11, 21, 31, 41, 51, 61], shape=[3, 2]) inp2 = constant_op.constant( @@ -52,12 +52,12 @@ class IdentityNOpTest(test.TestCase): def testString(self): source = [b"A", b"b", b"C", b"d", b"E", b"f"] - with self.test_session() as sess: + with self.cached_session() as sess: [value] = sess.run(array_ops.identity_n([source])) self.assertAllEqual(source, value) def testIdentityShape(self): - with self.test_session(): + with self.cached_session(): shape = [2, 3] array_2x3 = [[1, 2, 3], [6, 5, 4]] tensor = constant_op.constant(array_2x3) |