V - data type for output() output@Operator public final class RandomPoissonV2<V extends Number> extends PrimitiveOp implements Operand<V>
This op uses two algorithms, depending on rate. If rate >= 10, then the algorithm by Hormann is used to acquire samples via transformation-rejection. See http://www.sciencedirect.com/science/article/pii/0167668793909974.
Otherwise, Knuth's algorithm is used to acquire samples via multiplying uniform random variables. See Donald E. Knuth (1969). Seminumerical Algorithms. The Art of Computer Programming, Volume 2. Addison Wesley
| Modifier and Type | Class and Description |
|---|---|
static class |
RandomPoissonV2.Options
Optional attributes for
RandomPoissonV2 |
operation| Modifier and Type | Method and Description |
|---|---|
Output<V> |
asOutput()
Returns the symbolic handle of a tensor.
|
static <V extends Number,T extends Number,U extends Number> |
create(Scope scope,
Operand<T> shape,
Operand<U> rate,
Class<V> dtype,
RandomPoissonV2.Options... options)
Factory method to create a class to wrap a new RandomPoissonV2 operation to the graph.
|
static <T extends Number,U extends Number> |
create(Scope scope,
Operand<T> shape,
Operand<U> rate,
RandomPoissonV2.Options... options)
Factory method to create a class to wrap a new RandomPoissonV2 operation to the graph, using default output types.
|
Output<V> |
output()
A tensor with shape `shape + shape(rate)`.
|
static RandomPoissonV2.Options |
seed(Long seed) |
static RandomPoissonV2.Options |
seed2(Long seed2) |
equals, hashCode, toStringpublic static <V extends Number,T extends Number,U extends Number> RandomPoissonV2<V> create(Scope scope, Operand<T> shape, Operand<U> rate, Class<V> dtype, RandomPoissonV2.Options... options)
scope - current graph scopeshape - 1-D integer tensor. Shape of independent samples to draw from each
distribution described by the shape parameters given in rate.rate - A tensor in which each scalar is a "rate" parameter describing the
associated poisson distribution.dtype - options - carries optional attributes valuespublic static <T extends Number,U extends Number> RandomPoissonV2<Long> create(Scope scope, Operand<T> shape, Operand<U> rate, RandomPoissonV2.Options... options)
scope - current graph scopeshape - 1-D integer tensor. Shape of independent samples to draw from each
distribution described by the shape parameters given in rate.rate - A tensor in which each scalar is a "rate" parameter describing the
associated poisson distribution.options - carries optional attributes valuespublic static RandomPoissonV2.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 RandomPoissonV2.Options seed2(Long seed2)
seed2 - A second seed to avoid seed collision.public Output<V> output()
public Output<V> 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<V extends Number>OperationBuilder.addInput(Output)Copyright © 2015–2019. All rights reserved.