MCPcopy Index your code
hub / github.com/tensorflow/hub / export

Method export

tensorflow_hub/saved_model_lib.py:396–411  ·  view source on GitHub ↗

Exports to SavedModel directory. Args: path: path where to export the SavedModel to. variables_saver: lambda that receives a directory path where to export checkpoints of variables.

(self, path, variables_saver=None)

Source from the content-addressed store, hash-verified

394 return get_attached_bytes_map(self.get_meta_graph(tags))
395
396 def export(self, path, variables_saver=None):
397 """Exports to SavedModel directory.
398
399 Args:
400 path: path where to export the SavedModel to.
401 variables_saver: lambda that receives a directory path where to
402 export checkpoints of variables.
403 """
404 # Operate on a copy of self._proto since it needs to be modified.
405 proto = saved_model_pb2.SavedModel()
406 proto.CopyFrom(self._proto)
407 assets_map = _make_assets_key_collection(proto, path)
408
409 self._save_all_assets(path, assets_map)
410 self._save_variables(path, variables_saver)
411 self._save_proto(path, proto)
412
413 def get_meta_graph(self, tags=None):
414 """Returns the matching MetaGraphDef or raises KeyError."""

Calls 4

_save_all_assetsMethod · 0.95
_save_variablesMethod · 0.95
_save_protoMethod · 0.95