#include <io_ops.h>
Restores a tensor from checkpoint files.
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 (*
and ?
) in the filename portion only, not in the directory portion.
If a 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 shard
input 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 order.
See also RestoreSlice
.
Arguments:
Optional attributes (see Attrs
):
file_pattern
.Returns:
Output
: The restored tensor. Constructors and Destructors | |
---|---|
Restore(const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, DataType dt) | |
Restore(const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, DataType dt, const Restore::Attrs & attrs) |
Public attributes | |
---|---|
tensor |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
PreferredShard(int64 x) |
Structs | |
---|---|
tensorflow::ops::Restore::Attrs | Optional attribute setters for Restore. |
::tensorflow::Output tensor
Restore( const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, DataType dt )
Restore( const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, DataType dt, const Restore::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs PreferredShard( int64 x )
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/restore.html