• Creates a tf.Tensor with values sampled from a truncated normal distribution.

    tf.truncatedNormal([2, 2]).print();
    

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

    Type Parameters

    • R extends Rank

    Parameters

    • shape: ShapeMap[R]

      An array of integers defining the output tensor shape.

    • Optional mean: number

      The mean of the normal distribution.

    • Optional stdDev: number

      The standard deviation of the normal distribution.

    • Optional dtype: "float32" | "int32"

      The data type of the output tensor.

    • Optional seed: number

      The seed for the random number generator.

    Returns Tensor<R>

    Doc

Generated using TypeDoc