Routines.py 文件源码

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

项目:structured-output-ae 作者: sbelharbi 项目源码 文件源码
def eval_classificationT( self, y, p_y):
        """Calculate the error (100 - accuracy) of the DNN in the case of classification.

        :type y: vector 
        :param y: vector (r,) of labels

        :type p_y: matrix
        :param p_y: matrix of the output of the network. Each raw is a vector of probailities (probablities of the classes)
        """

        y_ = T.argmax(p_y, axis = 1)
        # Accuracy
        error = 1 - T.mean(T.eq(y_, y) * 1.)
        error = error * 100.

        return error
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号