aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/ops/random_ops.cc
diff options
context:
space:
mode:
authorGravatar Dhananjay Nakrani <dhananjayn@google.com>2017-10-31 12:08:18 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-10-31 12:11:33 -0700
commitc911d0f169a8f536ca22feb1f1ca67ce2b43888b (patch)
treee1201812ebfacd4b2d651fef36bfd18cb9d95599 /tensorflow/core/ops/random_ops.cc
parentb5d5326c6228e449c53c4ea02fa9225f4eec5ee7 (diff)
Switch over python calls to RandomPoissonV2.
Part 2 of Support int32/64 in tf.random_poisson(). PiperOrigin-RevId: 174071745
Diffstat (limited to 'tensorflow/core/ops/random_ops.cc')
-rw-r--r--tensorflow/core/ops/random_ops.cc29
1 files changed, 2 insertions, 27 deletions
diff --git a/tensorflow/core/ops/random_ops.cc b/tensorflow/core/ops/random_ops.cc
index eee1ed1d2a..2429171fa9 100644
--- a/tensorflow/core/ops/random_ops.cc
+++ b/tensorflow/core/ops/random_ops.cc
@@ -265,8 +265,6 @@ output: A tensor with shape `shape + shape(alpha)`. Each slice
`alpha[i0, i1, ...iN]`. The dtype of the output matches the dtype of alpha.
)doc");
-// TODO(dhananayn): Deprecate RandomPoisson and switch over to RandomPoissonV2
-// after forward compatibility period has passed.
REGISTER_OP("RandomPoisson")
.SetIsStateful()
.Input("shape: S")
@@ -283,32 +281,9 @@ REGISTER_OP("RandomPoisson")
c->set_output(0, out);
return Status::OK();
})
+ .Deprecated(25, "Replaced by RandomPoissonV2")
.Doc(R"doc(
-Outputs random values from the Poisson distribution(s) described by rate.
-
-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
-
-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.
-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.
-
-output: A tensor with shape `shape + shape(rate)`. Each slice
- `[:, ..., :, i0, i1, ...iN]` contains the samples drawn for
- `rate[i0, i1, ...iN]`. The dtype of the output matches the dtype of
- rate.
+Use RandomPoissonV2 instead.
)doc");
REGISTER_OP("RandomPoissonV2")