{{ message }}
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple suggestions to clarify the documentation:
PyTorch cites Graves et al for its implementation. Since your implementation is also based on this paper, please add it as a reference as well.
Please add a short paragraph explaining how the loss is actually calculated. This should explain some general questions about your variables (What is
blank? What isalpha, and why is it calculated using DP?) so that the reader understands what is being calculated. I ask for this because this repository is meant for educational purposes, so we want readers to understand how and why the implementation works.Also, in your implementation you use
np.logaddexpfor log-probabilities when calculatingalpharather than calculating probabilities directly. Since this differs from the definitions in the Graves et al paper, please be sure to note this implementation detail in your explanation.