Skip to content

Commit

Permalink
fix to adjust for huggingface#8530 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stas00 committed Nov 18, 2020
1 parent b592728 commit 6eb8094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/seq2seq/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def _step(self, batch: dict) -> Tuple:
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)
Expand Down

0 comments on commit 6eb8094

Please sign in to comment.