File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
tensorflow_serving/session_bundle Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 2626loading and execution code.
2727"""
2828
29+ from __future__ import print_function
30+
2931# This is a placeholder for a Google-internal import.
3032
3133import tensorflow as tf
@@ -63,7 +65,7 @@ def Export():
6365 # CopyAssets is used as a callback during export to copy files to the
6466 # given export directory.
6567 def CopyAssets (export_path ):
66- print "copying asset files to: %s" % export_path
68+ print ( "copying asset files to: %s" % export_path )
6769
6870 # Use a fixed global step number.
6971 global_step_tensor = tf .Variable (123 , name = "global_step" )
Original file line number Diff line number Diff line change 2020
2121import os
2222import re
23+ import six
2324
2425import tensorflow as tf
2526
@@ -94,7 +95,7 @@ def generic_signature(name_tensor_map):
9495 A Signature message.
9596 """
9697 signature = manifest_pb2 .Signature ()
97- for name , tensor in name_tensor_map .iteritems ():
98+ for name , tensor in six .iteritems (name_tensor_map ):
9899 signature .generic_signature .map [name ].tensor_name = tensor .name
99100 return signature
100101
@@ -167,7 +168,7 @@ def init(self,
167168 signatures_proto = manifest_pb2 .Signatures ()
168169 if default_graph_signature :
169170 signatures_proto .default_signature .CopyFrom (default_graph_signature )
170- for signature_name , signature in named_graph_signatures .iteritems ():
171+ for signature_name , signature in six .iteritems (named_graph_signatures ):
171172 signatures_proto .named_signatures [signature_name ].CopyFrom (signature )
172173 signatures_any_buf = any_pb2 .Any ()
173174 signatures_any_buf .Pack (signatures_proto )
You can’t perform that action at this time.
0 commit comments