tf.random.truncated_normal()用法——截断正态分布

来自https://tensorflow.google.cn/versions/r1.15/api_docs/python/tf/random/truncated_normal?hl=en

Outputs random values from a truncated normal distribution.

此函数别名有:

  • tf.compat.v1.random.truncated_normal
  • tf.compat.v1.truncated_normal
  • tf.compat.v2.random.truncated_normal
  • tf.truncated_normal
tf.random.truncated_normal(
    shape,
    mean=0.0,
    stddev=1.0,
    dtype=tf.dtypes.float32,
    seed=None,
    name=None
)

Args:

  • shape: A 1-D integer Tensor or Python array. The shape of the output tensor.
  • mean: A 0-D Tensor or Python value of type dtype. The mean of the truncated normal distribution.均值默认为0
  • stddev: A 0-D Tensor or Python value of type dtype. The standard deviation of the normal distribution, before truncation.截断前正态分布的标准偏差,默认为1.0
  • dtype: The type of the output.
  • seed: A Python integer. Used to create a random seed for the distribution. Seetf.compat.v1.set_random_seed for behavior.
  • name: A name for the operation (optional).

 

你可能感兴趣的:(Tensorflow的函数们)