def __call__(self, x, t):
# To solve the classification problem with "softmax", use "softmax_cross_entropy".
h = self.fwd(x)
loss = F.softmax_cross_entropy (h, t)
chainer.report({'loss': loss, 'accuracy': F.accuracy(h, t)}, self)
return loss
评论列表
文章目录