Commit 169550ae authored by Emanuele Sansone's avatar Emanuele Sansone
Browse files

fix issue #1858

In reader.py, GFile returns an object of type bytes independently from the Python version. Therefore, the object must be decoded as string in any case. Removed the check of Python version
parent 11883ec6
......@@ -28,9 +28,6 @@ import tensorflow as tf
def _read_words(filename):
with tf.gfile.GFile(filename, "r") as f:
if sys.version_info[0] >= 3:
return f.read().replace("\n", "<eos>").split()
else:
return f.read().decode("utf-8").replace("\n", "<eos>").split()
......
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