Export trained model to use it in TensorFlow Serving or cloudML.
(model_path)
| 103 | |
| 104 | |
| 105 | def 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 | |
| 115 | def export_compact(model_path): |
no test coverage detected