Skip to content

Commit

Permalink
fix encoder outputs (#8368)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickvonplaten authored Nov 6, 2020
1 parent bc0d26d commit 0770879
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/transformers/generation_tf_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,7 @@ def generate(
shape=(-1,),
)
# expand encoder_outputs
encoder_outputs = (tf.gather(encoder_outputs[0], expanded_batch_idxs, axis=0), *encoder_outputs[1:])

encoder_outputs = (tf.gather(encoder_outputs[0], expanded_batch_idxs, axis=0),)
else:
encoder_outputs = None
cur_len = shape_list(input_ids)[-1]
Expand Down

0 comments on commit 0770879

Please sign in to comment.