X Tutup
The Wayback Machine - https://web.archive.org/web/20201001214804/https://github.com/allenai/allennlp/issues/2302
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

Improve documentation of _SoftmaxLoss #2302

Open
nelson-liu opened this issue Jan 8, 2019 · 2 comments
Open

Improve documentation of _SoftmaxLoss #2302

nelson-liu opened this issue Jan 8, 2019 · 2 comments

Comments

@nelson-liu
Copy link
Member

@nelson-liu nelson-liu commented Jan 8, 2019

more details at: #2264 (comment)

@joepalermo
Copy link
Contributor

@joepalermo joepalermo commented May 30, 2020

It appears that this class now lives here: https://github.com/allenai/allennlp/blob/master/allennlp/modules/softmax_loss.py

From nelson's link, the ask is:
"Can you explicitly document here in the constructor that this class does not add a padding ID, and that the input targets to forward should not include the padding id?" -matt-peters

@matt-peters I'd like to do this and just want to make sure I understand what you mean. I suppose it could be reasonable to assume that a class such as this might add a word into the vocabulary corresponding to a padding ID (i.e. new vocabulary size would be num_words+1), and that the target tensor argument could include such an id. If I’m right about what you mean that does strike me as an unnatural design, and I would be surprised if a user thought that was how it worked. Would you still like this amendment to the documentation included?

Thanks

@pavingblock1212

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.
X Tutup