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)
| 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.""" |