diff options
Diffstat (limited to 'tensorflow/python/framework/ops_test.py')
-rw-r--r-- | tensorflow/python/framework/ops_test.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tensorflow/python/framework/ops_test.py b/tensorflow/python/framework/ops_test.py index 82e455c3ec..cfc96a0cc8 100644 --- a/tensorflow/python/framework/ops_test.py +++ b/tensorflow/python/framework/ops_test.py @@ -1228,8 +1228,8 @@ class ColocationGroupTest(test_util.TensorFlowTestCase): with ops.colocate_with(a.op): b = constant_op.constant(3.0) c = constant_op.constant(4.0) - self.assertEqual(["loc:@a"], a.op.colocation_groups()) - self.assertEqual(["loc:@a"], b.op.colocation_groups()) + self.assertEqual([b"loc:@a"], a.op.colocation_groups()) + self.assertEqual([b"loc:@a"], b.op.colocation_groups()) with self.assertRaises(ValueError): c.op.get_attr("_class") @@ -1242,7 +1242,7 @@ class ColocationGroupTest(test_util.TensorFlowTestCase): # colocated with 'a', which is on '/gpu:0'. colocate_with # overrides devices because it is a stronger constraint. b = constant_op.constant(3.0) - self.assertEqual(["loc:@a"], b.op.colocation_groups()) + self.assertEqual([b"loc:@a"], b.op.colocation_groups()) self.assertEqual(a.op.device, b.op.device) def testLocationOverrides(self): @@ -1258,7 +1258,7 @@ class ColocationGroupTest(test_util.TensorFlowTestCase): c = constant_op.constant(4.0) d = constant_op.constant(5.0) - self.assertEqual(["loc:@a"], b.op.colocation_groups()) + self.assertEqual([b"loc:@a"], b.op.colocation_groups()) self.assertEqual("/device:GPU:0", a.op.device) self.assertEqual(a.op.device, b.op.device) @@ -1272,8 +1272,8 @@ class ColocationGroupTest(test_util.TensorFlowTestCase): b = constant_op.constant(3.0) with ops.colocate_with(b.op): c = constant_op.constant(4.0) - self.assertEqual(["loc:@a"], b.op.colocation_groups()) - self.assertEqual(["loc:@a"], c.op.colocation_groups()) + self.assertEqual([b"loc:@a"], b.op.colocation_groups()) + self.assertEqual([b"loc:@a"], c.op.colocation_groups()) def testMultiColocationGroups(self): a = constant_op.constant([2.0], name="a") @@ -1281,7 +1281,7 @@ class ColocationGroupTest(test_util.TensorFlowTestCase): with ops.colocate_with(a.op): with ops.colocate_with(b.op): c = constant_op.constant(4.0) - self.assertEqual(set(["loc:@a", "loc:@b"]), set(c.op.colocation_groups())) + self.assertEqual(set([b"loc:@a", b"loc:@b"]), set(c.op.colocation_groups())) def testColocationIgnoreStack(self): a = constant_op.constant([2.0], name="a") @@ -1295,7 +1295,7 @@ class ColocationGroupTest(test_util.TensorFlowTestCase): a = variables.Variable([2.0], name="a") with ops.colocate_with(a.op): b = variables.Variable([3.0], name="b") - self.assertEqual(["loc:@a"], b.op.colocation_groups()) + self.assertEqual([b"loc:@a"], b.op.colocation_groups()) def testInconsistentDeviceWithinColocate(self): with ops.device("/gpu:0"): |