# tensorflow::ops::RandomUniform

`#include <random_ops.h>`

Outputs random values from a uniform distribution.

## Summary

The generated values follow a uniform distribution in the range `[0, 1)`. The lower bound 0 is included in the range, while the upper bound 1 is excluded.

Arguments:

- scope: A [Scope](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- shape: The shape of the output tensor.
- dtype: The type of the output.

<br />

Optional attributes (see `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-uniform/attrs#structtensorflow_1_1ops_1_1_random_uniform_1_1_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.

<br />

Returns:

- `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: A tensor of the specified shape filled with uniform random values.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1ad758763396f811e3da060a04692f3757(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, DataType dtype)` ||
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1af801ace5d9f1abc9d79f7faa85b91be1(const ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, DataType dtype, const https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-uniform/attrs#structtensorflow_1_1ops_1_1_random_uniform_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1a48b146cd2bbea78fcf781a469864ef5b` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1a54d90aa9b91d5e835309793ec96a7c8c` | `::https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1ad3b4ee570c67616fea7d0670af60cc64() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1ab00525e4be653b53523769acea109196() const ` | ` `` ` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1ac3f462ba3c34c4b0d7c759eb376e778c() const ` | ` `` ` |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1a73a0bbeaa8d9935acb48c58b8b636644(int64 x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-uniform/attrs#structtensorflow_1_1ops_1_1_random_uniform_1_1_attrs` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform_1a4821471eea8691d99ec491eef1aedd06(int64 x)` | `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-uniform/attrs#structtensorflow_1_1ops_1_1_random_uniform_1_1_attrs` |

| ### Structs ||
|---|---|
| [tensorflow::ops::RandomUniform::Attrs](https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/random-uniform/attrs) | Optional attribute setters for [RandomUniform](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/random-uniform#classtensorflow_1_1ops_1_1_random_uniform). |

## Public attributes

### operation

```
Operation operation
```

### output

```
::tensorflow::Output output
```

## Public functions

### RandomUniform

```
 RandomUniform(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  DataType dtype
)
```

### RandomUniform

```
 RandomUniform(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input shape,
  DataType dtype,
  const RandomUniform::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
)
```