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

Function export_compact

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

Export trained model to use it as a frozen and pruned inference graph in mobile applications.

(model_path)

Source from the content-addressed store, hash-verified

113
114
115def export_compact(model_path):
116 """Export trained model to use it as a frozen and pruned inference graph in
117 mobile applications. """
118 pred_config = PredictConfig(
119 session_init=SmartInit(model_path),
120 model=Model(),
121 input_names=['input_img'],
122 output_names=['prediction_img'])
123 ModelExporter(pred_config).export_compact('/tmp/compact_graph.pb')
124
125
126def apply(model_path):

Callers 1

export-model.pyFile · 0.85

Calls 5

ModelExporterClass · 0.90
PredictConfigClass · 0.85
SmartInitFunction · 0.85
export_compactMethod · 0.80
ModelClass · 0.70

Tested by

no test coverage detected