RestoreV2


tensorflow C++ API

tensorflow::ops::RestoreV2

Restores tensors from a V2 checkpoint.


Summary

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.

Arguments:

  • scope: A Scope object
  • prefix: Must have a single element. The prefix of a V2 checkpoint.
  • tensor_names: shape {N}. The names of the tensors to be restored.
  • shape_and_slices: shape {N}. The slice specs of the tensors to be restored. Empty strings indicate that they are non-partitioned tensors.
  • dtypes: shape {N}. The list of expected dtype for the tensors. Must match those stored in the checkpoint.

Returns:

  • OutputList: shape {N}. The restored tensors, whose shapes are read from the checkpoint directly.

Constructor

  • RestoreV2(const ::tensorflow::Scope & scope, ::tensorflow::Input prefix, ::tensorflow::Input tensor_names, ::tensorflow::Input shape_and_slices, const DataTypeSlice & dtypes).

Public attributes

  • tensorflow::OutputList tensors

RestoreV2 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 prefix: input file_pattern with path.
  • Input tensor_names: input tensor_name.
  • shape_and_slices : input shape_and_slices.
  • DataTypeSlice dtypes : input DataTypeSlice ;

Return:

  • Output tensor : Output tensor of Restore class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""