Commit e93fdcca authored by Justine Tunney's avatar Justine Tunney
Browse files

Revert "Use open() instead of tf.gfile.FastGFile()"

This reverts commit c6a4f783.

Fixed tensorflow/tensorflow#4981
parent 43dad800
......@@ -210,7 +210,7 @@ def _to_sequence_example(image, decoder, vocab):
Returns:
A SequenceExample proto.
"""
with open(image.filename, "r") as f:
with tf.gfile.FastGFile(image.filename, "r") as f:
encoded_image = f.read()
try:
......
......@@ -199,7 +199,7 @@ def _process_image(filename, coder):
width: integer, image width in pixels.
"""
# Read the image file.
with open(filename, 'r') as f:
with tf.gfile.FastGFile(filename, 'r') as f:
image_data = f.read()
# Convert any PNG to JPEG's for consistency.
......
......@@ -313,7 +313,7 @@ def _process_image(filename, coder):
width: integer, image width in pixels.
"""
# Read the image file.
with open(filename, 'r') as f:
with tf.gfile.FastGFile(filename, 'r') as f:
image_data = f.read()
# Clean the dirty data.
......
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