-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Patch neg sampling #1796
Patch neg sampling #1796
Conversation
This has been opened in favour of #1793. |
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.
LGTM! Will wait for @astonzhang to merge and double check this.
@AnirudhDagar Thanks a lot for your patience. Can you say where did I get wrong? Just for further contributions, I am asking. |
Job d2l-en/PR-1796/2 is complete. |
@armingh2000 I'm not very sure why the If that doesn't solve the problem, i think it might be a windows only issue, you can go ahead and raise an issue on the d2lbook github repo for that. |
@AnirudhDagar yes I think you're right. I'll check that out. Thanks |
@armingh2000 Great catch! I'll further simplify your proposed change as |
@armingh2000, would you like to send another PR to replace your id with name in our acknowledgement: Thanks! |
@astonzhang yes that would be better. Should I change the related .md file and compile after that? If not, how can I change my id to my name? |
You may wish to refer to 19.6.1 https://d2l.ai/chapter_appendix-tools-for-deep-learning/contributing.html on how to edit the md file (replacing id with name) |
Description of changes:
For negative sampling, the get_negatives function is not working properly. I changed the way it iterates through the dictionary. It works fine now.
@AnirudhDagar I made 2 commits here. The first is for .md file. The second one is after running
d2lbook build lib
and nothing else was changed thereafter. But there are no imports in torch.py file :|By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.