From cdf1b7ae825994e4b79e9d60f32e463651747220 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Wed, 18 Nov 2020 07:25:00 -0800 Subject: [PATCH] fix to adjust for #8530 changes (#8612) --- examples/seq2seq/finetune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/seq2seq/finetune.py b/examples/seq2seq/finetune.py index a095c318b1..156b4695a6 100755 --- a/examples/seq2seq/finetune.py +++ b/examples/seq2seq/finetune.py @@ -148,7 +148,7 @@ class SummarizationModule(BaseTransformer): self.save_readable_batch(batch) outputs = self(src_ids, attention_mask=src_mask, decoder_input_ids=decoder_input_ids, use_cache=False) - lm_logits = outputs[0] + lm_logits = outputs["logits"] if self.hparams.label_smoothing == 0: # Same behavior as modeling_bart.py, besides ignoring pad_token_id ce_loss_fct = torch.nn.CrossEntropyLoss(ignore_index=pad_token_id)