#include <random_ops.h>
Outputs random integers from a uniform distribution.
The generated values are uniform integers in the range [minval, maxval)
. The lower bound minval
is included in the range, while the upper bound maxval
is excluded.
The random integers are slightly biased unless maxval - minval
is an exact power of two. The bias is small for values of maxval - minval
significantly smaller than the range of the output (either 2^32
or 2^64
).
Arguments:
Optional attributes (see Attrs
):
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.Returns:
Output
: A tensor of the specified shape filled with uniform random integers. Constructors and Destructors | |
---|---|
RandomUniformInt(const ::tensorflow::Scope & scope, ::tensorflow::Input shape, ::tensorflow::Input minval, ::tensorflow::Input maxval) | |
RandomUniformInt(const ::tensorflow::Scope & scope, ::tensorflow::Input shape, ::tensorflow::Input minval, ::tensorflow::Input maxval, const RandomUniformInt::Attrs & attrs) |
Public attributes | |
---|---|
output |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
Seed(int64 x) | |
Seed2(int64 x) |
Structs | |
---|---|
tensorflow::ops::RandomUniformInt::Attrs | Optional attribute setters for RandomUniformInt. |
::tensorflow::Output output
RandomUniformInt( const ::tensorflow::Scope & scope, ::tensorflow::Input shape, ::tensorflow::Input minval, ::tensorflow::Input maxval )
RandomUniformInt( const ::tensorflow::Scope & scope, ::tensorflow::Input shape, ::tensorflow::Input minval, ::tensorflow::Input maxval, const RandomUniformInt::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs Seed( int64 x )
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-uniform-int.html