Skip to content

Commit

Permalink
Change graph_def file opening mode from to 'rb' (tensorflow#6071)
Browse files Browse the repository at this point in the history
As discussed here: tensorflow/tensorflow#11312, this change allows this script to work in Python 3.
  • Loading branch information
ctessum authored and pkulzc committed Feb 11, 2019
1 parent d58f759 commit c928554
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def build_inference_graph(image_tensor, inference_graph_path):
detected_labels_tensor: Detected labels. Int64 tensor,
shape=[num_detections]
"""
with tf.gfile.Open(inference_graph_path, 'r') as graph_def_file:
with tf.gfile.Open(inference_graph_path, 'rb') as graph_def_file:
graph_content = graph_def_file.read()
graph_def = tf.GraphDef()
graph_def.MergeFromString(graph_content)
Expand Down

0 comments on commit c928554

Please sign in to comment.