Skip to content

Commit 8242b4d

Browse files
author
Vijay Vasudevan
committed
TensorFlow: some more python3 compatibility test fixes
Change-Id: I5678cbdfb45757e2218494f542c9b0a0d5cc16a4
1 parent 014ff10 commit 8242b4d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tensorflow/python/kernel_tests/parsing_ops_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ def testSequenceExampleWithMultipleSizeFeatureLists(self):
610610
int64_feature([5, 6, 7]),
611611
int64_feature([8, 9, 10]),]),
612612
"b": feature_list([
613-
bytes_feature(["r00", "r01", "r10", "r11"])]),
613+
bytes_feature([b"r00", b"r01", b"r10", b"r11"])]),
614614
"c": feature_list([
615615
float_feature([3, 4]),
616616
float_feature([-1, 2])]),
@@ -625,7 +625,7 @@ def testSequenceExampleWithMultipleSizeFeatureLists(self):
625625
[[5, 6, 7]],
626626
[[8, 9, 10]]], dtype=np.int64),
627627
"b": np.array([ # outer dimension is time, inside are 2x2 matrices
628-
[["r00", "r01"], ["r10", "r11"]]], dtype=np.str),
628+
[[b"r00", b"r01"], [b"r10", b"r11"]]], dtype=np.str),
629629
"c": np.array([ # outer dimension is time, inside are 2-vectors
630630
[3, 4],
631631
[-1, 2]], dtype=np.float32),

tensorflow/python/kernel_tests/sparse_serialization_ops_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def testSerializeManyDeserializeManyRoundTrip(self):
9595
with self.test_session(use_gpu=False) as sess:
9696
# N == 4 because shape_value == [4, 5]
9797
indices_value = np.array([[0, 0], [0, 1], [2, 0]], dtype=np.int64)
98-
values_value = np.array(["a", "b", "c"])
98+
values_value = np.array([b"a", b"b", b"c"])
9999
shape_value = np.array([4, 5], dtype=np.int64)
100100
sparse_tensor = self._SparseTensorPlaceholder(dtype=tf.string)
101101
serialized = tf.serialize_many_sparse(sparse_tensor)

tensorflow/python/ops/image_ops_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ def testBatch(self):
4949
batch1 = image_ops.rgb_to_hsv(batch0)
5050
batch2 = image_ops.hsv_to_rgb(batch1)
5151
split0 = array_ops.unpack(batch0)
52-
split1 = map(image_ops.rgb_to_hsv, split0)
53-
split2 = map(image_ops.hsv_to_rgb, split1)
52+
split1 = list(map(image_ops.rgb_to_hsv, split0))
53+
split2 = list(map(image_ops.hsv_to_rgb, split1))
5454
join1 = array_ops.pack(split1)
5555
join2 = array_ops.pack(split2)
5656
batch1, batch2, join1, join2 = sess.run([batch1, batch2, join1, join2])

0 commit comments

Comments
 (0)