Skip to content

fix bug - #2

Open
tianyu-z wants to merge 2 commits into
Tikquuss:mainfrom
tianyu-z:main
Open

fix bug#2
tianyu-z wants to merge 2 commits into
Tikquuss:mainfrom
tianyu-z:main

Conversation

@tianyu-z

Copy link
Copy Markdown

There is a bug. The generated seq is always one digit less than the expected seq. To fix this, I made max_len = max_length + 1.
image

Besides, does anyone know why we have the prob as softmax of log softmax? Thanks!
scores = scores.log_softmax(dim=1) sample_temperature = 1 probs = F.softmax(scores / sample_temperature, dim=1) # softmax of log softmax? next_words = torch.multinomial(probs, 1).squeeze(1)

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