Class RandomDataset
java.lang.Object
org.tensorflow.op.RawOp
org.tensorflow.op.data.RandomDataset
Creates a Dataset that returns pseudorandom numbers.
Creates a Dataset that returns a stream of uniformly distributed
pseudorandom 64-bit signed integers. It accepts a boolean attribute that
determines if the random number generators are re-applied at each epoch. The
default value is True which means that the seeds are applied and the same
sequence of random numbers are generated at each epoch. If set to False, the
seeds are not re-applied and a different sequence of random numbers are
generated at each epoch.
In the TensorFlow Python API, you can instantiate this dataset via the
class tf.data.experimental.RandomDatasetV2.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of this op, as known by TensorFlow core engine -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasOutput()Returns the symbolic handle of the tensor.static RandomDatasetcreate(Scope scope, Operand<TInt64> seed, Operand<TInt64> seed2, Operand<? extends TType> seedGenerator, List<Class<? extends TType>> outputTypes, List<Shape> outputShapes, RandomDataset.Options... options) Factory method to create a class wrapping a new RandomDatasetV2 operation.handle()Gets handle.static RandomDataset.OptionsSets the metadata option.static RandomDataset.OptionsrerandomizeEachIteration(Boolean rerandomizeEachIteration) Sets the rerandomizeEachIteration option.
-
Field Details
-
OP_NAME
The name of this op, as known by TensorFlow core engine- See Also:
-
-
Constructor Details
-
RandomDataset
-
-
Method Details
-
create
@Endpoint(describeByClass=true) public static RandomDataset create(Scope scope, Operand<TInt64> seed, Operand<TInt64> seed2, Operand<? extends TType> seedGenerator, List<Class<? extends TType>> outputTypes, List<Shape> outputShapes, RandomDataset.Options... options) Factory method to create a class wrapping a new RandomDatasetV2 operation.- Parameters:
scope- current scopeseed- A scalar seed for the random number generator. If either seed or seed2 is set to be non-zero, the random number generator is seeded by the given seed. Otherwise, a random seed is used.seed2- A second scalar seed to avoid seed collision.seedGenerator- A resource for the random number seed generator.outputTypes- The value of the outputTypes attributeoutputShapes- The value of the outputShapes attributeoptions- carries optional attribute values- Returns:
- a new instance of RandomDataset
-
rerandomizeEachIteration
Sets the rerandomizeEachIteration option.- Parameters:
rerandomizeEachIteration- A boolean attribute to rerandomize the sequence of random numbers generated at each epoch.- Returns:
- this Options instance.
-
metadata
Sets the metadata option.- Parameters:
metadata- the metadata option- Returns:
- this Options instance.
-
handle
-
asOutput
Description copied from interface:OperandReturns the symbolic handle of the 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.
-