U - data type for output() output@Operator public final class TruncatedNormal<U extends Number> extends PrimitiveOp implements Operand<U>
The generated values follow a normal distribution with mean 0 and standard deviation 1, except that values whose magnitude is more than 2 standard deviations from the mean are dropped and re-picked.
| Modifier and Type | Class and Description |
|---|---|
static class |
TruncatedNormal.Options
Optional attributes for
TruncatedNormal |
operation| Modifier and Type | Method and Description |
|---|---|
Output<U> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <U extends Number,T extends Number> |
create(Scope scope,
Operand<T> shape,
Class<U> dtype,
TruncatedNormal.Options... options)
Factory method to create a class to wrap a new TruncatedNormal operation to the graph.
|
Output<U> |
output()
A tensor of the specified shape filled with random truncated normal
values.
|
static TruncatedNormal.Options |
seed(Long seed) |
static TruncatedNormal.Options |
seed2(Long seed2) |
equals, hashCode, toStringpublic static <U extends Number,T extends Number> TruncatedNormal<U> create(Scope scope, Operand<T> shape, Class<U> dtype, TruncatedNormal.Options... options)
scope - current graph scopeshape - The shape of the output tensor.dtype - The type of the output.options - carries optional attributes valuespublic static TruncatedNormal.Options seed(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 TruncatedNormal.Options seed2(Long seed2)
seed2 - A second seed to avoid seed collision.public Output<U> output()
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 Number>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.