aep_models.py 文件源码

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

项目:geepee 作者: thangbui 项目源码 文件源码
def _forward_prop_random_thru_cav_mm(self, mx, vx):
        """Propagate uncertain inputs thru cavity, using simple Moment Matching

        Args:
            mx (float): input means, size K x Din
            vx (TYPE): input variances, size K x Din

        Returns:
            output means and variances, and intermediate info for backprop
        """
        psi0 = np.exp(2 * self.sf)
        psi1, psi2 = compute_psi_weave(
            2 * self.ls, 2 * self.sf, mx, vx, self.zu)
        mout = np.einsum('nm,dm->nd', psi1, self.Ahat)
        Bhatpsi2 = np.einsum('dab,nab->nd', self.Bhat_sto, psi2)
        vout = psi0 + Bhatpsi2 - mout**2
        return mout, vout, psi1, psi2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号