Commit ee46c63b authored by Sergey Edunov's avatar Sergey Edunov Committed by Myle Ott
Browse files

Fix adaptive loss logging

parent e775877f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ class AdaptiveLoss(FairseqCriterion):
        sample_size = sum(log.get('sample_size', 0) for log in logging_outputs)
        agg_output = {
            'loss': loss_sum / sample_size / math.log(2),
            'nll_loss': loss_sum / sample_size / math.log(2),
            'ntokens': ntokens,
            'nsentences': nsentences,
            'sample_size': sample_size,