nonlinearity.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:paysage 作者: drckf 项目源码 文件源码
def normal_inverse_cdf(p: T.Tensor) -> T.Tensor:
    """
    Elementwise inverse cumulative distribution function of the standard normal
    distribution.

    For the inverse CDF of a normal distributon with mean u and standard deviation sigma,
    use u + sigma * normal_inverse_cdf(p).

    Args:
        p (tensor bounded in (0,1))

    Returns:
        tensor: Elementwise inverse cdf

    """
    return SQRT2*erfinv(2*numpy.clip(p, a_min=EPSILON, a_max=1-EPSILON)-1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号