来源:https://tensorflow.google.cn/api_docs/python/tf/distributions/Normal
The Normal distribution with location loc
and scale
parameters.
该函数定义了一个正态分布。
Mathematical details
The probability density function (pdf) is,
pdf(x; mu, sigma) = exp(-0.5 (x - mu)**2 / sigma**2) / Z
Z = (2 pi sigma**2)**0.5
where loc = mu
is the mean, scale = sigma
is the std. deviation, and, Z
is the normalization constant.
__init__(
loc,
scale,
validate_args=False,
allow_nan_stats=True,
name='Normal'
)
举例,tf.distributions.Normal(loc=0,scale=1) # 这个是标准正态分布