Skip to content

Conversation

@ssnl
Copy link
Collaborator

@ssnl ssnl commented Nov 22, 2017

Fixes #3506

Verified that gradients are identical for sparse and dense in Embedding(padding_idx=(not None), sparse=True) with same weight matrix.

@ssnl ssnl changed the title Fix padding_idx ignored in backward for Embedding(sparse=True) Fix padding_idx getting ignored in backward for Embedding(sparse=True) Nov 22, 2017
@soumith soumith merged commit 6dc1fc7 into pytorch:master Nov 23, 2017
@ssnl ssnl deleted the sparse_idz branch November 23, 2017 03:08
@soumith soumith added the 0.3.1 label Feb 4, 2018
soumith pushed a commit that referenced this pull request Feb 7, 2018
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.

nn.Embedding with sparse=True ignores padding_idx

3 participants