RestoreSlices
tensorflow C++ API
Restores a tensor from checkpoint files.
Summary
This is likeRestore
except that restored tensor can be listed as filling only a slice of a larger tensor.shape_and_slice
specifies the shape of the larger tensor and the slice that the restored tensor covers.
Theshape_and_slice
input has the same format as the elements of theshapes_and_slices
input of theSaveSlices
op.
Arguments:
- scope: A Scope object
- file_pattern: Must have a single element. The pattern of the files from which we read the tensor.
- tensor_name: Must have a single element. The name of the tensor to be restored.
- shape_and_slice: Scalar. The shapes and slice specifications to use when restoring a tensors.
- dt: The type of the tensor to be restored.
Optional attributes (seeAttrs
):
- preferred_shard: Index of file to open first if multiple files match
file_pattern
. See the documentation forRestore
.
Returns:
- Output : The restored tensor.
Constructor
- RestoreSlice(const ::tensorflow::Scope & scope, ::tensorflow::Input file_pattern, ::tensorflow::Input tensor_name, ::tensorflow::Input shape_and_slice, DataType dt, const RestoreSlice::Attrs & attrs).
Public attributes
- tensorflow::Output tensor
Restore block
Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_i_o__ops.cpp
Argument:
- Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
- Input file_pattern: input file_pattern with path.
- Input tensor_names: input tensor_name.
- Restore::Attrs attrs : input attrs. ex) preferred_shard_ = -1;
Return:
- Output tensor : Output tensor of Restore class object.
Result:
- std::vector(Tensor) product_result : Returned object of executed result by calling session.