Skip to content

Commit b6866ca

Browse files
committed
Read code file data as binary
1 parent 5d854dd commit b6866ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

research/compression/image_encoder/decoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def main(_):
7171
return
7272

7373
contents = ''
74-
with tf.gfile.FastGFile(FLAGS.input_codes, 'r') as code_file:
74+
with tf.gfile.FastGFile(FLAGS.input_codes, 'rb') as code_file:
7575
contents = code_file.read()
7676
loaded_codes = np.load(io.BytesIO(contents))
7777
assert ['codes', 'shape'] not in loaded_codes.files

0 commit comments

Comments
 (0)