"git@developer.sourcefind.cn:OpenDAS/torch-scatter.git" did not exist on "feca30d12428ac88bd5cdaaa91eaad312ebc9e45"
Commit b6866caa authored by Raphael Zumer's avatar Raphael Zumer
Browse files

Read code file data as binary

parent 5d854ddc
...@@ -71,7 +71,7 @@ def main(_): ...@@ -71,7 +71,7 @@ def main(_):
return return
contents = '' contents = ''
with tf.gfile.FastGFile(FLAGS.input_codes, 'r') as code_file: with tf.gfile.FastGFile(FLAGS.input_codes, 'rb') as code_file:
contents = code_file.read() contents = code_file.read()
loaded_codes = np.load(io.BytesIO(contents)) loaded_codes = np.load(io.BytesIO(contents))
assert ['codes', 'shape'] not in loaded_codes.files assert ['codes', 'shape'] not in loaded_codes.files
......
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