W3cubDocs

/TensorFlow C++

tensorflow::ops::RandomPoissonV2

#include <random_ops.h>

Outputs random values from the Poisson distribution(s) described by rate.

Summary

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

Arguments:

  • scope: A Scope object
  • shape: 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.

Optional attributes (see Attrs):

  • 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.
  • seed2: A second seed to avoid seed collision.

Returns:

  • Output: A tensor with shape shape + shape(rate). Each slice [:, ..., :, i0, i1, ...iN] contains the samples drawn for rate[i0, i1, ...iN].
Constructors and Destructors
RandomPoissonV2(const ::tensorflow::Scope & scope, ::tensorflow::Input shape, ::tensorflow::Input rate)
RandomPoissonV2(const ::tensorflow::Scope & scope, ::tensorflow::Input shape, ::tensorflow::Input rate, const RandomPoissonV2::Attrs & attrs)
Public attributes
output
Public functions
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Public static functions
Dtype(DataType x)
Seed(int64 x)
Seed2(int64 x)
Structs
tensorflow::ops::RandomPoissonV2::Attrs

Optional attribute setters for RandomPoissonV2.

Public attributes

output

::tensorflow::Output output

Public functions

RandomPoissonV2

 RandomPoissonV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input rate
)

RandomPoissonV2

 RandomPoissonV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input rate,
  const RandomPoissonV2::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Public static functions

Dtype

Attrs Dtype(
  DataType x
)

Seed

Attrs Seed(
  int64 x
)

Seed2

Attrs Seed2(
  int64 x
)

© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/random-poisson-v2.html