U - data type for output() output@Operator(group="random") public final class RandomUniform<U extends java.lang.Number> extends PrimitiveOp implements Operand<U>
The generated values follow a uniform distribution in the range `[0, 1)`. The lower bound 0 is included in the range, while the upper bound 1 is excluded.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
RandomUniform.Options |
Optional attributes for
RandomUniform |
operation| Modifier and Type | Method | Description |
|---|---|---|
Output<U> |
asOutput() |
Returns the symbolic handle of a tensor.
|
static <U extends java.lang.Number,T extends java.lang.Number> |
create(Scope scope,
Operand<T> shape,
java.lang.Class<U> dtype,
RandomUniform.Options... options) |
Factory method to create a class to wrap a new RandomUniform operation to the graph.
|
Output<U> |
output() |
A tensor of the specified shape filled with uniform random values.
|
static RandomUniform.Options |
seed(java.lang.Long seed) |
|
static RandomUniform.Options |
seed2(java.lang.Long seed2) |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitequals, hashCode, toStringpublic static <U extends java.lang.Number,T extends java.lang.Number> RandomUniform<U> create(Scope scope, Operand<T> shape, java.lang.Class<U> dtype, RandomUniform.Options... options)
scope - current graph scopeshape - The shape of the output tensor.dtype - The type of the output.options - carries optional attributes valuespublic static RandomUniform.Options seed(java.lang.Long seed)
seed - If either `seed` or `seed2` are set to be non-zero, the random number
generator is seeded by the given seed. Otherwise, it is seeded by a
random seed.public static RandomUniform.Options seed2(java.lang.Long seed2)
seed2 - A second seed to avoid seed collision.public Output<U> 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<U extends java.lang.Number>OperationBuilder.addInput(Output)