Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix beam search output_log_prob index error #732

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cpm0722
Copy link

@cpm0722 cpm0722 commented Jul 25, 2023

output_log_probs's shape should be (gen_length, batch_size*beam_width),
but id_offset assumes that the shape of tensor is (max_input_length+gen_legnth, batch_size*beam_width).

So, I define new index gen_offset which assumes that the shape of tensor is (gen_length, batch_size*beam_width).

beam_width),
but id_offset assumes that the shape of tensor is ((max_input_length +
gen_legnth), batch_size * beam_width).
@cpm0722 cpm0722 changed the title beam search output_log_prob index error Fix beam search output_log_prob index error Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant