__init__.py 文件源码

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

项目:deel 作者: uei 项目源码 文件源码
def firstInput(self,t,x=None):
        if x is None:
            x=Tensor.context
        _x = x.content
        _t = t.content
        _y = self.func(_x,mode=1)
        loss = chainer.functions.loss.softmax_cross_entropy.softmax_cross_entropy(_y,_t)
        self.func.y = _y
        self.func.loss = loss
        self.accum_loss += loss
        self.cur_log_perp += loss.data

        return x
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号