TruncatedNormal


tensorflow C++ API

tensorflow::ops::TruncatedNormal

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.

TruncatedNormal block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_random.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • Input shape: connect Input node.
  • DataType dtype: Input DataType in Value. ex)DT_DOUBLE;
  • TruncatedNormal ::Attrs attrs : Input attrs in value. ex) seed_ = 0;seed2_ = 0;

Return:

  • Output output : Output object of TruncatedNormal class object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""