SnapshotDataset

public final class SnapshotDataset

Creates a dataset that will write to / read from a snapshot.

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.

Nested Classes

class SnapshotDataset.Options Optional attributes for SnapshotDataset

Public Methods

Output <Object>
asOutput ()
Returns the symbolic handle of a tensor.
static SnapshotDataset.Options
compression (String compression)
static SnapshotDataset
create ( Scope scope, Operand <?> inputDataset, Operand <String> path, List<Class<?>> outputTypes, List< Shape > outputShapes, Options... options)
Factory method to create a class wrapping a new SnapshotDataset operation.
Output <?>
static SnapshotDataset.Options
mode (String mode)
static SnapshotDataset.Options
numReaderThreads (Long numReaderThreads)
static SnapshotDataset.Options
numWriterThreads (Long numWriterThreads)
static SnapshotDataset.Options
pendingSnapshotExpirySeconds (Long pendingSnapshotExpirySeconds)
static SnapshotDataset.Options
readerBufferSize (Long readerBufferSize)
static SnapshotDataset.Options
readerPathPrefix (String readerPathPrefix)
static SnapshotDataset.Options
seed (Long seed)
static SnapshotDataset.Options
seed2 (Long seed2)
static SnapshotDataset.Options
shardSizeBytes (Long shardSizeBytes)
static SnapshotDataset.Options
shuffleOnRead (Boolean shuffleOnRead)
static SnapshotDataset.Options
snapshotName (String snapshotName)
static SnapshotDataset.Options
writerBufferSize (Long writerBufferSize)
static SnapshotDataset.Options
writerPathPrefix (String writerPathPrefix)

Inherited Methods

Public Methods

public Output <Object> asOutput ()

Returns the symbolic handle of a tensor.

Inputs 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.

public static SnapshotDataset.Options compression (String compression)

public static SnapshotDataset create ( Scope scope, Operand <?> inputDataset, Operand <String> path, List<Class<?>> outputTypes, List< Shape > outputShapes, Options... options)

Factory method to create a class wrapping a new SnapshotDataset operation.

Parameters
scope current scope
inputDataset A variant tensor representing the input dataset.
path The path we should write snapshots to / read snapshots from.
options carries optional attributes values
Returns
  • a new instance of SnapshotDataset

public Output <?> handle ()

public static SnapshotDataset.Options mode (String mode)

public static SnapshotDataset.Options numReaderThreads (Long numReaderThreads)

public static SnapshotDataset.Options numWriterThreads (Long numWriterThreads)

public static SnapshotDataset.Options pendingSnapshotExpirySeconds (Long pendingSnapshotExpirySeconds)

public static SnapshotDataset.Options readerBufferSize (Long readerBufferSize)

public static SnapshotDataset.Options readerPathPrefix (String readerPathPrefix)

public static SnapshotDataset.Options seed (Long seed)

public static SnapshotDataset.Options seed2 (Long seed2)

public static SnapshotDataset.Options shardSizeBytes (Long shardSizeBytes)

public static SnapshotDataset.Options shuffleOnRead (Boolean shuffleOnRead)

public static SnapshotDataset.Options snapshotName (String snapshotName)

public static SnapshotDataset.Options writerBufferSize (Long writerBufferSize)

public static SnapshotDataset.Options writerPathPrefix (String writerPathPrefix)