"git@developer.sourcefind.cn:OpenDAS/torch-cluster.git" did not exist on "763644ecd6053327530dc99611d8ee38dfd68c63"
Unverified Commit bd56a06d authored by Jon Shlens's avatar Jon Shlens Committed by GitHub
Browse files

Merge pull request #3639 from ppwwyyxx/patch-1

Fix build_imagenet_data.py for python2
parents 02571056 39b7dcf9
...@@ -171,7 +171,7 @@ def _float_feature(value): ...@@ -171,7 +171,7 @@ def _float_feature(value):
def _bytes_feature(value): def _bytes_feature(value):
"""Wrapper for inserting bytes features into Example proto.""" """Wrapper for inserting bytes features into Example proto."""
if isinstance(value, six.string_types): if six.PY3 and isinstance(value, six.text_type):
value = six.binary_type(value, encoding='utf-8') value = six.binary_type(value, encoding='utf-8')
return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment