Restores a tensor from checkpoint files.
Compat aliases for migration
See Migration guide for more details.
tf.raw_ops.Restore( file_pattern, tensor_name, dt, preferred_shard=-1, name=None )
Reads a tensor stored in one or several files. If there are several files (for
instance because a tensor was saved as slices),
file_pattern may contain
wildcard symbols (
?) in the filename portion only, not in the
file_pattern matches several files,
preferred_shard can be used to hint
in which file the requested tensor is likely to be found. This op will first
open the file at index
preferred_shard in the list of matching files and try
to restore tensors from that file. Only if some tensors or tensor slices are
not found in that first file, then the Op opens all the files. Setting
preferred_shard to match the value passed as the
of a matching
Save Op may speed up Restore. This attribute only affects
performance, not correctness. The default value -1 means files are processed in
string. Must have a single element. The pattern of the files from which we read the tensor.
string. Must have a single element. The name of the tensor to be restored.
tf.DType. The type of the tensor to be restored.
preferred_shard: An optional
int. Defaults to
-1. Index of file to open first if multiple files match
name: A name for the operation (optional).
Tensor of type