MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / export_serving

Function export_serving

examples/basics/export-model.py:105–112  ·  view source on GitHub ↗

Export trained model to use it in TensorFlow Serving or cloudML.

(model_path)

Source from the content-addressed store, hash-verified

103
104
105def export_serving(model_path):
106 """Export trained model to use it in TensorFlow Serving or cloudML. """
107 pred_config = PredictConfig(
108 session_init=SmartInit(model_path),
109 model=InferenceOnlyModel(),
110 input_names=['input_img_bytes'],
111 output_names=['prediction_img_bytes'])
112 ModelExporter(pred_config).export_serving('/tmp/exported')
113
114
115def export_compact(model_path):

Callers 1

export-model.pyFile · 0.85

Calls 5

ModelExporterClass · 0.90
PredictConfigClass · 0.85
SmartInitFunction · 0.85
InferenceOnlyModelClass · 0.85
export_servingMethod · 0.80

Tested by

no test coverage detected