tf.raw_ops.RestoreV2
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Restores tensors from a V2 checkpoint.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.raw_ops.RestoreV2
tf.raw_ops.RestoreV2(
prefix, tensor_names, shape_and_slices, dtypes, name=None
)
For backward compatibility with the V1 format, this Op currently allows
restoring from a V1 checkpoint as well:
- This Op first attempts to find the V2 index file pointed to by "prefix", and
if found proceed to read it as a V2 checkpoint;
- Otherwise the V1 read path is invoked.
Relying on this behavior is not recommended, as the ability to fall back to read
V1 might be deprecated and eventually removed.
By default, restores the named tensors in full. If the caller wishes to restore
specific slices of stored tensors, "shape_and_slices" should be non-empty
strings and correspondingly well-formed.
Callers must ensure all the named tensors are indeed stored in the checkpoint.
Args |
prefix
|
A Tensor of type string .
Must have a single element. The prefix of a V2 checkpoint.
|
tensor_names
|
A Tensor of type string .
shape {N}. The names of the tensors to be restored.
|
shape_and_slices
|
A Tensor of type string .
shape {N}. The slice specs of the tensors to be restored.
Empty strings indicate that they are non-partitioned tensors.
|
dtypes
|
A list of tf.DTypes that has length >= 1 .
shape {N}. The list of expected dtype for the tensors. Must match
those stored in the checkpoint.
|
name
|
A name for the operation (optional).
|
Returns |
A list of Tensor objects of type dtypes .
|
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 2024-01-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-01-23 UTC."],[],[]]