tf.random.truncated_normal()-截断正态分布

tf.random.truncated_normal()-截断正态分布

一、总结

一句话总结:

sigmoid激活函数,用截断的正态分布更好,因为这样就不会有两侧的梯度消失的情况

二、tf.random.truncated

转自或参考:tf.random.truncated
https://blog.csdn.net/qq_39894692/article/details/101635922

来自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).
 
我的旨在学过的东西不再忘记(主要使用艾宾浩斯遗忘曲线算法及其它智能学习复习算法)的偏公益性质的完全免费的编程视频学习网站: fanrenyi.com;有各种前端、后端、算法、大数据、人工智能等课程。
博主25岁,前端后端算法大数据人工智能都有兴趣。
大家有啥都可以加博主联系方式(qq404006308,微信fan404006308)互相交流。工作、生活、心境,可以互相启迪。
聊技术,交朋友,修心境,qq404006308,微信fan404006308
26岁,真心找女朋友,非诚勿扰,微信fan404006308,qq404006308
人工智能群:939687837

作者相关推荐

原文地址:https://www.cnblogs.com/Renyi-Fan/p/13417732.html