What is difference between tf.truncated_normal and tf.random_normal?

前端 未结 3 2031
轻奢々
轻奢々 2020-12-13 08:44

tf.random_normal(shape, mean=0.0, stddev=1.0, dtype=tf.float32, seed=None, name=None) outputs random values from a normal distribution.

tf.truncat

3条回答
  •  执笔经年
    2020-12-13 09:02

    The API documentation for tf.truncated_normal() describes the function as:

    Outputs random values from a truncated normal distribution.

    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.

提交回复
热议问题