Use tf.gfile.Open instead of tf.gfile.FastGFile for consistency
tf.gfile.FastGFile is actually tf.gfile.GFile in the open source
version of TensorFlow.
@@ -53,7 +53,7 @@ def get_third_party_dir():
def count_lines(filename):
"""Returns the number of lines of the file :obj:`filename`."""
- with tf.gfile.FastGFile(filename, mode="rb") as f:
+ with tf.gfile.Open(filename, mode="rb") as f:
i = 0
for i, _ in enumerate(f):
pass
