diff options
author | Sergei Lebedev <s.lebedev@criteo.com> | 2018-08-21 21:38:30 +0200 |
---|---|---|
committer | Sergei Lebedev <s.lebedev@criteo.com> | 2018-08-21 21:38:30 +0200 |
commit | 94ef0a70717d83316042cba924e70fe024a51661 (patch) | |
tree | b58c3561063fc4e6b0ab53e520d9f37101e53b99 /tensorflow/python/tools | |
parent | 3f08f82a7c896d357262a47eda8df80b778a2672 (diff) |
Fixed mode in load_inputs_from_input_arg_string
NPY files are binary and should be opened with mode "rb".
Diffstat (limited to 'tensorflow/python/tools')
-rw-r--r-- | tensorflow/python/tools/saved_model_cli.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/tools/saved_model_cli.py b/tensorflow/python/tools/saved_model_cli.py index 38fed5335e..f215ac80ae 100644 --- a/tensorflow/python/tools/saved_model_cli.py +++ b/tensorflow/python/tools/saved_model_cli.py @@ -544,7 +544,7 @@ def load_inputs_from_input_arg_string(inputs_str, input_exprs_str, input_examples = preprocess_input_examples_arg_string(input_examples_str) for input_tensor_key, (filename, variable_name) in inputs.items(): - data = np.load(file_io.FileIO(filename, mode='r')) + data = np.load(file_io.FileIO(filename, mode='rb')) # When a variable_name key is specified for the input file if variable_name: |