Skip to content

Commit

Permalink
fix serving export (fix #1449)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppwwyyxx committed Jun 1, 2020
1 parent 315eab9 commit 7c76e76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/FasterRCNN/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def do_predict(pred_func, input_file):
if args.output_pb:
ModelExporter(predcfg).export_compact(args.output_pb, optimize=False)
elif args.output_serving:
ModelExporter(predcfg).export_serving(args.output_serving, optimize=False)
ModelExporter(predcfg).export_serving(args.output_serving)

if args.predict:
predictor = OfflinePredictor(predcfg)
Expand Down
4 changes: 2 additions & 2 deletions tensorpack/tfutils/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def export_serving(self, filename,
Args:
filename (str): path for export directory
tags (tuple): tuple of user specified tags. Defaults to "SERVING".
tags (tuple): tuple of user specified tags. Defaults to just "SERVING".
signature_name (str): name of signature for prediction
Note:
Expand All @@ -115,7 +115,7 @@ def export_serving(self, filename,
"""
if tags is None:
tags = (tf.saved_model.SERVING if get_tf_version_tuple() >= (1, 12)
else tf.saved_model.tag_constants.SERVING)
else tf.saved_model.tag_constants.SERVING, )

self.graph = self.config._maybe_create_graph()
with self.graph.as_default():
Expand Down

0 comments on commit 7c76e76

Please sign in to comment.