tensorflow::ops::RandomUniformInt

#include <random_ops.h>

Outputs random integers from a uniform distribution.

Summary

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:

  • scope: A Scope object
  • shape: The shape of the output tensor.
  • minval: 0-D. Inclusive lower bound on the generated integers.
  • maxval: 0-D. Exclusive upper bound on the generated integers.

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 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

operation
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.

Public attributes

operation

Operation operation

output

::tensorflow::Output output

Public functions

RandomUniformInt

 RandomUniformInt(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input minval,
  ::tensorflow::Input maxval
)

RandomUniformInt

 RandomUniformInt(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  ::tensorflow::Input minval,
  ::tensorflow::Input maxval,
  const RandomUniformInt::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Public static functions

Seed

Attrs Seed(
  int64 x
)

Seed2

Attrs Seed2(
  int64 x
)