Skip to content

Commit

Permalink
[EncoderDecoder] Fix Typo (#7915)
Browse files Browse the repository at this point in the history
* fix encoder decoder models

* add .gitignore
  • Loading branch information
patrickvonplaten authored Oct 19, 2020
1 parent 55bcd0c commit c912ba5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,6 @@ debug.env

#ctags
tags

# pre-commit
.pre-commit*
2 changes: 0 additions & 2 deletions src/transformers/modeling_encoder_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ def forward(
encoder_attentions=encoder_outputs.attentions,
)

return decoder_outputs + encoder_outputs

def prepare_inputs_for_generation(self, input_ids, past, attention_mask, encoder_outputs, **kwargs):
decoder_inputs = self.decoder.prepare_inputs_for_generation(input_ids)
decoder_attention_mask = decoder_inputs["attention_mask"] if "attention_mask" in decoder_inputs else None
Expand Down

0 comments on commit c912ba5

Please sign in to comment.