objectives.py 文件源码

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

项目:NumpyDL 作者: oujago 项目源码 文件源码
def forward(self, outputs, targets):
        """MeanSquaredError forward propagation. 

        .. math:: L = (p - t)^2

        Parameters
        ----------
        outputs, targets : numpy.array 
            The arrays to compute the squared difference between.

        Returns
        -------
        numpy.array 
            An expression for the element-wise squared difference.
        """
        return 0.5 * np.mean(np.sum(np.power(outputs - targets, 2), axis=1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号