def normal_cdf(x: T.Tensor) -> T.Tensor:
"""
Elementwise cumulative distribution function of the standard normal distribution.
For the CDF of a normal distributon with mean u and standard deviation sigma, use
normal_cdf((x-u)/sigma).
Args:
x (tensor)
Returns:
tensor: Elementwise cdf
"""
return 0.5 * (1 + erf(x/SQRT2))
评论列表
文章目录