# tensorflow::ops::TruncatedNormal Class Reference

# tensorflow::
ops::
TruncatedNormal

`
#include <random_ops.h>
`


Outputs random values from a truncated normal distribution.

## Summary


The generated values follow a normal distribution with mean 0 and standard deviation 1, except that values whose magnitude is more than 2 standard deviations from the mean are dropped and re-picked.


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.5/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/r2.5/api_docs/cc/struct/tensorflow/ops/truncated-normal/attrs#structtensorflow_1_1ops_1_1_truncated_normal_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/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output
  ` : A tensor of the specified shape filled with random truncated normal values.

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1affc5d8efb95031e4d6866afea6db4885 (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, DataType dtype) ` ||
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a0c16f49d32f82c76b2f48fe989d40ede (const :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, DataType dtype, const https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/truncated-normal/attrs#structtensorflow_1_1ops_1_1_truncated_normal_1_1_attrs & attrs) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a94e86733620c725cfd18c220e7befc91 ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1ab70e3146207138655b0a57215318f04a ` | ` :: https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a1a306e31c92dabe3e30540b020a5d2cd () const ` | ` ::tensorflow::Node * ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a2ad5d4b0f4e2b937af0d1f4b903fec79 () const ` | ` ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a1e4ef0edec5a8828733bb2a0b7ba01e0 () const ` | ` ` |

| ### Public static functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a16a37eaf4346dae9789c2dcadf2bd7cc (int64 x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/truncated-normal/attrs#structtensorflow_1_1ops_1_1_truncated_normal_1_1_attrs ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal_1a678db3a004d1f6bdd50b02a65ca1efc6 (int64 x) ` | ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/truncated-normal/attrs#structtensorflow_1_1ops_1_1_truncated_normal_1_1_attrs ` |

| ### Structs ||
|---|---|
| [tensorflow:: ops:: TruncatedNormal:: Attrs](https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/truncated-normal/attrs) | Optional attribute setters for [TruncatedNormal](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/truncated-normal#classtensorflow_1_1ops_1_1_truncated_normal) . |

## Public attributes

### operation

```
Operation operation
```

### output

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

## Public functions

### TruncatedNormal

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

### TruncatedNormal

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