RBM.py 文件源码

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

项目:char-rbm 作者: colinmorris 项目源码 文件源码
def _mean_hiddens(self, v, temperature=1.0):
        """Computes the probabilities P(h=1|v).

        v : array-like, shape (n_samples, n_features)
            Values of the visible layer.

        Returns
        -------
        h : array-like, shape (n_samples, n_components)
            Corresponding mean field values for the hidden layer.
        """
        p = safe_sparse_dot(v, self.components_.T/temperature)
        p += self.intercept_hidden_/(min(1.0, temperature) if BIASED_PRIOR else temperature)
        return expit(p, out=p)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号