TensorFlow: some more python3 compatibility test fixes
Change-Id: I5678cbdfb45757e2218494f542c9b0a0d5cc16a4
This commit is contained in:
parent
014ff10c4f
commit
8242b4dd1b
@ -610,7 +610,7 @@ class ParseSequenceExampleTest(tf.test.TestCase):
|
||||
int64_feature([5, 6, 7]),
|
||||
int64_feature([8, 9, 10]),]),
|
||||
"b": feature_list([
|
||||
bytes_feature(["r00", "r01", "r10", "r11"])]),
|
||||
bytes_feature([b"r00", b"r01", b"r10", b"r11"])]),
|
||||
"c": feature_list([
|
||||
float_feature([3, 4]),
|
||||
float_feature([-1, 2])]),
|
||||
@ -625,7 +625,7 @@ class ParseSequenceExampleTest(tf.test.TestCase):
|
||||
[[5, 6, 7]],
|
||||
[[8, 9, 10]]], dtype=np.int64),
|
||||
"b": np.array([ # outer dimension is time, inside are 2x2 matrices
|
||||
[["r00", "r01"], ["r10", "r11"]]], dtype=np.str),
|
||||
[[b"r00", b"r01"], [b"r10", b"r11"]]], dtype=np.str),
|
||||
"c": np.array([ # outer dimension is time, inside are 2-vectors
|
||||
[3, 4],
|
||||
[-1, 2]], dtype=np.float32),
|
||||
|
@ -95,7 +95,7 @@ class SerializeSparseTest(tf.test.TestCase):
|
||||
with self.test_session(use_gpu=False) as sess:
|
||||
# N == 4 because shape_value == [4, 5]
|
||||
indices_value = np.array([[0, 0], [0, 1], [2, 0]], dtype=np.int64)
|
||||
values_value = np.array(["a", "b", "c"])
|
||||
values_value = np.array([b"a", b"b", b"c"])
|
||||
shape_value = np.array([4, 5], dtype=np.int64)
|
||||
sparse_tensor = self._SparseTensorPlaceholder(dtype=tf.string)
|
||||
serialized = tf.serialize_many_sparse(sparse_tensor)
|
||||
|
@ -49,8 +49,8 @@ class RGBToHSVTest(test_util.TensorFlowTestCase):
|
||||
batch1 = image_ops.rgb_to_hsv(batch0)
|
||||
batch2 = image_ops.hsv_to_rgb(batch1)
|
||||
split0 = array_ops.unpack(batch0)
|
||||
split1 = map(image_ops.rgb_to_hsv, split0)
|
||||
split2 = map(image_ops.hsv_to_rgb, split1)
|
||||
split1 = list(map(image_ops.rgb_to_hsv, split0))
|
||||
split2 = list(map(image_ops.hsv_to_rgb, split1))
|
||||
join1 = array_ops.pack(split1)
|
||||
join2 = array_ops.pack(split2)
|
||||
batch1, batch2, join1, join2 = sess.run([batch1, batch2, join1, join2])
|
||||
|
Loading…
Reference in New Issue
Block a user