Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::MergeV2Checkpoints
#include <io_ops.h>
V2 format specific: merges the metadata files of sharded checkpoints.
Summary
The
result is one logical checkpoint, with one physical metadata file and renamed data files.
Intended for "grouping" multiple checkpoints in a sharded checkpoint setup.
If delete_old_dirs is true, attempts to delete recursively the dirname of each path in the input checkpoint_prefixes. This is useful when those paths are non user-facing temporary locations.
If allow_missing_files is true, merges the checkpoint prefixes as long as at least one file exists. Otherwise, if no files exist, an error will be thrown. The default value for allow_missing_files is false.
Args:
- scope: A Scope object
- checkpoint_prefixes: prefixes of V2 checkpoints to merge.
- destination_prefix: scalar. The desired final prefix. Allowed to be the same as one of the checkpoint_prefixes.
Optional attributes (see Attrs
):
- delete_old_dirs: see above.
- allow_missing_files: see above.
Returns:
Public attributes
Public functions
operator::tensorflow::Operation
operator::tensorflow::Operation() const
Public static functions
AllowMissingFiles
Attrs AllowMissingFiles(
bool x
)
DeleteOldDirs
Attrs DeleteOldDirs(
bool x
)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::MergeV2Checkpoints Class Reference\n\ntensorflow::ops::MergeV2Checkpoints\n===================================\n\n`#include \u003cio_ops.h\u003e`\n\nV2 format specific: merges the metadata files of sharded checkpoints.\n\nSummary\n-------\n\nThe\n\nresult is one logical checkpoint, with one physical metadata file and renamed data files.\n\nIntended for \"grouping\" multiple checkpoints in a sharded checkpoint setup.\n\nIf delete_old_dirs is true, attempts to delete recursively the dirname of each path in the input checkpoint_prefixes. This is useful when those paths are non user-facing temporary locations.\n\nIf allow_missing_files is true, merges the checkpoint prefixes as long as at least one file exists. Otherwise, if no files exist, an error will be thrown. The default value for allow_missing_files is false.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- checkpoint_prefixes: prefixes of V2 checkpoints to merge.\n- destination_prefix: scalar. The desired final prefix. Allowed to be the same as one of the checkpoint_prefixes.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/merge-v2-checkpoints/attrs#structtensorflow_1_1ops_1_1_merge_v2_checkpoints_1_1_attrs)):\n\n- delete_old_dirs: see above.\n- allow_missing_files: see above.\n\n\u003cbr /\u003e\n\nReturns:\n\n- the created [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [MergeV2Checkpoints](#classtensorflow_1_1ops_1_1_merge_v2_checkpoints_1aa902c6451357a9d599c2c64f683945ed)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` checkpoint_prefixes, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` destination_prefix)` ||\n| [MergeV2Checkpoints](#classtensorflow_1_1ops_1_1_merge_v2_checkpoints_1ad1192c95172d80f30658cfadf2a90ba1)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` checkpoint_prefixes, ::`[tensorflow::Input](/versions/r2.14/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` destination_prefix, const `[MergeV2Checkpoints::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/merge-v2-checkpoints/attrs#structtensorflow_1_1ops_1_1_merge_v2_checkpoints_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_merge_v2_checkpoints_1a01552fb0e89ef5dee73b9528d4c99733) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------|---|\n| [operator::tensorflow::Operation](#classtensorflow_1_1ops_1_1_merge_v2_checkpoints_1aa19e8785d4f1ff8d9a6dc401d078b5d6)`() const ` | |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| [AllowMissingFiles](#classtensorflow_1_1ops_1_1_merge_v2_checkpoints_1a2255ae917c00a91126c5c96c45647033)`(bool x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/merge-v2-checkpoints/attrs#structtensorflow_1_1ops_1_1_merge_v2_checkpoints_1_1_attrs) |\n| [DeleteOldDirs](#classtensorflow_1_1ops_1_1_merge_v2_checkpoints_1aacd19b816ee69eb23b3a8390b61a5fdc)`(bool x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/merge-v2-checkpoints/attrs#structtensorflow_1_1ops_1_1_merge_v2_checkpoints_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::MergeV2Checkpoints::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/merge-v2-checkpoints/attrs) | Optional attribute setters for [MergeV2Checkpoints](/versions/r2.14/api_docs/cc/class/tensorflow/ops/merge-v2-checkpoints#classtensorflow_1_1ops_1_1_merge_v2_checkpoints). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### MergeV2Checkpoints\n\n```gdscript\n MergeV2Checkpoints(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input checkpoint_prefixes,\n ::tensorflow::Input destination_prefix\n)\n``` \n\n### MergeV2Checkpoints\n\n```gdscript\n MergeV2Checkpoints(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input checkpoint_prefixes,\n ::tensorflow::Input destination_prefix,\n const MergeV2Checkpoints::Attrs & attrs\n)\n``` \n\n### operator::tensorflow::Operation\n\n```gdscript\n operator::tensorflow::Operation() const \n``` \n\nPublic static functions\n-----------------------\n\n### AllowMissingFiles\n\n```text\nAttrs AllowMissingFiles(\n bool x\n)\n``` \n\n### DeleteOldDirs\n\n```text\nAttrs DeleteOldDirs(\n bool x\n)\n```"]]