tf.truncated_normal

truncated_normal(
shape,
mean=0.0,
stddev=1.0,
dtype=tf.float32,
seed=None,
name=None
)
Defined in tensorflow/python/ops/random_ops.py.

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.

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.
stddev: A 0-D Tensor or Python value of type dtype. The standard deviation(标准差) of the truncated normal distribution.
dtype: The type of the output.
seed: A Python integer. Used to create a random seed for the distribution. See tf.set_random_seed for behavior.
name: A name for the operation (optional).

Returns:

A tensor of the specified shape filled with random truncated normal values.



最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • (一) 曾经好多次路过家餐厅,名字蛮特别的:某某某冰煮羊。我一直不明白什么叫冰煮羊,我也一直很纳闷这家店究竟是吃什...
    范范的范阅读 311评论 0 0
  • 序列化,指将PHP中 对象、类、数组、变量、匿名函数等,转化为字符串,用户「数据库存储」、「数据的传输」 反序列化...
    赖赖魔的自留地阅读 429评论 0 1
  • 问青山不语,怕是相思,最是相思。可惜柔情,都付与黄昏,谁与温存。 天长梦短,剪断愁痕。恨千里路远,算得几许风尘。闲...
    迷曳阅读 160评论 0 3