Loading fairseq/criterions/label_smoothed_cross_entropy.py +1 −1 Changes for fairseq/criterions/label_smoothed_cross_entropy.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class LabelSmoothedCrossEntropyCriterion(FairseqCriterion): sample_size = sample['target'].size(0) if self.args.sentence_avg else sample['ntokens'] logging_output = { 'loss': utils.item(loss.data) if reduce else loss.data, 'nll_loss': utils.item(nll_loss.data) if reduce else loss.data, 'nll_loss': utils.item(nll_loss.data) if reduce else nll_loss.data, 'ntokens': sample['ntokens'], 'sample_size': sample_size, } Loading Loading
fairseq/criterions/label_smoothed_cross_entropy.py +1 −1 Changes for fairseq/criterions/label_smoothed_cross_entropy.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ class LabelSmoothedCrossEntropyCriterion(FairseqCriterion): sample_size = sample['target'].size(0) if self.args.sentence_avg else sample['ntokens'] logging_output = { 'loss': utils.item(loss.data) if reduce else loss.data, 'nll_loss': utils.item(nll_loss.data) if reduce else loss.data, 'nll_loss': utils.item(nll_loss.data) if reduce else nll_loss.data, 'ntokens': sample['ntokens'], 'sample_size': sample_size, } Loading