"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "e287b8b079d48c3b8cb14750eab27624d44bfddc"
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): ...@@ -210,7 +210,7 @@ def _to_sequence_example(image, decoder, vocab):
Returns: Returns:
A SequenceExample proto. A SequenceExample proto.
""" """
with open(image.filename, "r") as f: with tf.gfile.FastGFile(image.filename, "r") as f:
encoded_image = f.read() encoded_image = f.read()
try: try:
......
...@@ -199,7 +199,7 @@ def _process_image(filename, coder): ...@@ -199,7 +199,7 @@ def _process_image(filename, coder):
width: integer, image width in pixels. width: integer, image width in pixels.
""" """
# Read the image file. # Read the image file.
with open(filename, 'r') as f: with tf.gfile.FastGFile(filename, 'r') as f:
image_data = f.read() image_data = f.read()
# Convert any PNG to JPEG's for consistency. # Convert any PNG to JPEG's for consistency.
......
...@@ -313,7 +313,7 @@ def _process_image(filename, coder): ...@@ -313,7 +313,7 @@ def _process_image(filename, coder):
width: integer, image width in pixels. width: integer, image width in pixels.
""" """
# Read the image file. # Read the image file.
with open(filename, 'r') as f: with tf.gfile.FastGFile(filename, 'r') as f:
image_data = f.read() image_data = f.read()
# Clean the dirty data. # 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