updater.py 文件源码

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

项目:chainer-pix2pix 作者: pfnet-research 项目源码 文件源码
def loss_dis(self, dis, y_in, y_out):
        batchsize,_,w,h = y_in.data.shape

        L1 = F.sum(F.softplus(-y_in)) / batchsize / w / h
        L2 = F.sum(F.softplus(y_out)) / batchsize / w / h
        loss = L1 + L2
        chainer.report({'loss': loss}, dis)
        return loss
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号