Skip to content

Commit

Permalink
fix #2665 (#2877)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostML authored Jul 26, 2022
1 parent 174ce23 commit 8609c92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion paddlenlp/transformers/model_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _transformer_encoder_fwd(self,
if output_attentions:
all_attentions.append(outputs[-1])
if cache is not None:
new_caches.append(outputs[1])
new_caches.append(outputs[0])

if self.norm is not None:
output = self.norm(output)
Expand Down

0 comments on commit 8609c92

Please sign in to comment.