Skip to content

[fix] nn.Embedding.from_pretrained : honour padding_idx argument#47184

Closed
kshitij12345 wants to merge 2 commits intopytorch:masterfrom
kshitij12345:fix/embedding/from_pretrained
Closed

[fix] nn.Embedding.from_pretrained : honour padding_idx argument#47184
kshitij12345 wants to merge 2 commits intopytorch:masterfrom
kshitij12345:fix/embedding/from_pretrained

Conversation

@kshitij12345
Copy link
Copy Markdown
Collaborator

Fixes #46585 (first snippet)

Now the behaviour of padding_idx agrees with documentation.

@dr-ci
Copy link
Copy Markdown

dr-ci Bot commented Nov 2, 2020

💊 CI failures summary and remediations

As of commit 7b12a05 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 1 time.

Copy link
Copy Markdown
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to update this!

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@albanD has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 2, 2020

Codecov Report

Merging #47184 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #47184   +/-   ##
=======================================
  Coverage   60.81%   60.81%           
=======================================
  Files        2748     2748           
  Lines      254027   254030    +3     
=======================================
+ Hits       154488   154494    +6     
+ Misses      99539    99536    -3     

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@albanD merged this pull request in c68c3d0.

laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…ytorch#47184)

Summary:
Fixes pytorch#46585 (first snippet)

Now the behaviour of `padding_idx` agrees with documentation.

Pull Request resolved: pytorch#47184

Reviewed By: mruberry

Differential Revision: D24682567

Pulled By: albanD

fbshipit-source-id: 864bd34eb9099d367a3fcbb8f4f4ba2e2b270724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

padding_idx and provided weights in nn.Embedding and nn.functional.embedding

4 participants