Skip to content

Add padding_idx gradient backprop stopping for Embeddings - #11

Merged
vlad-karp merged 7 commits into
mainfrom
vladkarp-emb_grad
Oct 17, 2025
Merged

Add padding_idx gradient backprop stopping for Embeddings#11
vlad-karp merged 7 commits into
mainfrom
vladkarp-emb_grad

Conversation

@vlad-karp

Copy link
Copy Markdown
Collaborator

Fixes the missing logic to disable gradient calculation for the padded index in torch.nn.Embedding

To test the fix:
python -m unittest test.test_embedding

@vlad-karp
vlad-karp requested a review from qihqi October 17, 2025 00:58

@qihqi qihqi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

thanks!

@vlad-karp
vlad-karp merged commit b5a74f1 into main Oct 17, 2025
4 checks passed
@vlad-karp
vlad-karp deleted the vladkarp-emb_grad branch October 17, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants