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

Fix adaptive loss logging

parent e775877f
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment