public final class SnapshotDataset extends PrimitiveOp implements Operand<Object>
This dataset attempts to determine whether a valid snapshot exists at the `snapshot_path`, and reads from the snapshot in lieu of using `input_dataset`. If not, it will run the preprocessing pipeline as usual, and write out a snapshot of the data processed for future use.
| Modifier and Type | Class and Description |
|---|---|
static class |
SnapshotDataset.Options
Optional attributes for
SnapshotDataset |
operationequals, hashCode, op, toStringpublic static SnapshotDataset create(Scope scope, Operand<?> inputDataset, Operand<String> path, List<Class<?>> outputTypes, List<Shape> outputShapes, SnapshotDataset.Options... options)
scope - current scopeinputDataset - A variant tensor representing the input dataset.path - The path we should write snapshots to / read snapshots from.outputTypes - outputShapes - options - carries optional attributes valuespublic static SnapshotDataset.Options compression(String compression)
compression - public static SnapshotDataset.Options readerPathPrefix(String readerPathPrefix)
readerPathPrefix - public static SnapshotDataset.Options writerPathPrefix(String writerPathPrefix)
writerPathPrefix - public static SnapshotDataset.Options shardSizeBytes(Long shardSizeBytes)
shardSizeBytes - public static SnapshotDataset.Options pendingSnapshotExpirySeconds(Long pendingSnapshotExpirySeconds)
pendingSnapshotExpirySeconds - public static SnapshotDataset.Options numReaderThreads(Long numReaderThreads)
numReaderThreads - public static SnapshotDataset.Options readerBufferSize(Long readerBufferSize)
readerBufferSize - public static SnapshotDataset.Options numWriterThreads(Long numWriterThreads)
numWriterThreads - public static SnapshotDataset.Options writerBufferSize(Long writerBufferSize)
writerBufferSize - public Output<?> handle()
public Output<Object> asOutput()
OperandInputs to TensorFlow operations are outputs of another TensorFlow operation. This method is used to obtain a symbolic handle that represents the computation of the input.
asOutput in interface Operand<Object>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.