@Operator public final class RestoreV2 extends PrimitiveOp implements Iterable<Operand<Object>>
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.
operation| Modifier and Type | Method and Description |
|---|---|
static RestoreV2 |
create(Scope scope,
Operand<String> prefix,
Operand<String> tensorNames,
Operand<String> shapeAndSlices,
List<Class<?>> dtypes)
Factory method to create a class to wrap a new RestoreV2 operation to the graph.
|
Iterator<Operand<Object>> |
iterator() |
List<Output<?>> |
tensors()
shape {N}.
|
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static RestoreV2 create(Scope scope, Operand<String> prefix, Operand<String> tensorNames, Operand<String> shapeAndSlices, List<Class<?>> dtypes)
scope - current graph scopeprefix - Must have a single element. The prefix of a V2 checkpoint.tensorNames - shape {N}. The names of the tensors to be restored.shapeAndSlices - 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.public List<Output<?>> tensors()
Copyright © 2015–2019. All rights reserved.