소스 검색

add binary to file reading

Mahmoud Lababidi 8 년 전
부모
커밋
dd983ea6b9
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      inception/inception/data/build_image_data.py

+ 1 - 1
inception/inception/data/build_image_data.py

@@ -198,7 +198,7 @@ def _process_image(filename, coder):
     width: integer, image width in pixels.
   """
   # Read the image file.
-  with tf.gfile.FastGFile(filename, 'r') as f:
+  with tf.gfile.FastGFile(filename, 'rb') as f:
     image_data = f.read()
 
   # Convert any PNG to JPEG's for consistency.