chain.py 文件源码

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

项目:ddnn 作者: kunglab 项目源码 文件源码
def __init__(self, compute_accuracy=True, lossfun=softmax_cross_entropy.softmax_cross_entropy, branchweight=1, branchweights=None, ent_T=0.1, ent_Ts=None,
                 accfun=accuracy.accuracy):
        super(Chain,self).__init__()
        #branchweights = [1]*7+[1000]
        self.lossfun = lossfun
        if branchweight is not None and branchweights is None:
            self.branchweights = [branchweight]
        else:
            self.branchweights = branchweights
        if ent_T is not None and ent_Ts is None:
            self.ent_Ts = [ent_T]
        else:
            self.ent_Ts = ent_Ts
        self.accfun = accfun
        self.y = None
        self.loss = None
        self.accuracy = None
        self.compute_accuracy = compute_accuracy
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号