W3cubDocs

/TensorFlow C++

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.

Arguments:

  • scope: A Scope object
  • shape: The shape of the output tensor.
  • dtype: The type of the output.

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 random truncated normal values.
Constructors and Destructors
TruncatedNormal(const ::tensorflow::Scope & scope, ::tensorflow::Input shape, DataType dtype)
TruncatedNormal(const ::tensorflow::Scope & scope, ::tensorflow::Input shape, DataType dtype, const TruncatedNormal::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::TruncatedNormal::Attrs

Optional attribute setters for TruncatedNormal.

Public attributes

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
)

© 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/truncated-normal.html