Patching EmeddingBag to accept 2D input#2429
Merged
soumith merged 3 commits intopytorch:masterfrom Aug 23, 2017
ajfisch:embedding_bag_fix
Merged
Patching EmeddingBag to accept 2D input#2429soumith merged 3 commits intopytorch:masterfrom ajfisch:embedding_bag_fix
soumith merged 3 commits intopytorch:masterfrom
ajfisch:embedding_bag_fix
Conversation
apaszke
reviewed
Aug 16, 2017
torch/nn/modules/sparse.py
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Collaborator
|
@pytorchbot add to whitelist |
Collaborator
|
thanks Adam! |
zou3519
pushed a commit
to zou3519/pytorch
that referenced
this pull request
Mar 30, 2018
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
houseroad
added a commit
to houseroad/pytorch
that referenced
this pull request
Nov 7, 2019
…7f62f5 (pytorch#29363) Summary: Pull Request resolved: pytorch#29363 Previous import was 2891e1459745933f4bba9a8cb3371cf3c9eb1d16 Included changes: - **[fea8568c](onnx/onnx@fea8568c)**: minor changes to NonZero and Slice (pytorch#2429) <Ashwini Khade> - **[79bd5042](onnx/onnx@79bd5042)**: fix test bugs for resize op version 11 (pytorch#2425) <Ashwini Khade> - **[3ea3b0e0](onnx/onnx@3ea3b0e0)**: Add shape existence check in GatherElements shape inference logic (pytorch#2402) <Hariharan Seshadri> - **[192ad8c8](onnx/onnx@192ad8c8)**: add invite for next workshop (pytorch#2407) <Prasanth Pulavarthi> - **[eea60812](onnx/onnx@eea60812)**: Fix missing comma in exception message. Causes invalid message depending on what's in memory prior to the constant char string. (pytorch#2403) <Scott McKay> - **[dd082c99](onnx/onnx@dd082c99)**: Add section headers for easier linking (pytorch#2400) <Prasanth Pulavarthi> - **[ca1d5b7e](onnx/onnx@ca1d5b7e)**: Add type check for node inputs (pytorch#2367) <RandySheriffH> - **[e5600091](onnx/onnx@e5600091)**: Update doc loop op (pytorch#2337) <G. Ramalingam> Test Plan: ci Reviewed By: hl475 Differential Revision: D18365923 fbshipit-source-id: 29aedd36020db633a946a97bf7d22d9f27f82f09
facebook-github-bot
pushed a commit
that referenced
this pull request
Nov 7, 2019
…7f62f5 (#29363) Summary: Pull Request resolved: #29363 Previous import was 2891e1459745933f4bba9a8cb3371cf3c9eb1d16 Included changes: - **[fea8568c](onnx/onnx@fea8568c)**: minor changes to NonZero and Slice (#2429) <Ashwini Khade> - **[79bd5042](onnx/onnx@79bd5042)**: fix test bugs for resize op version 11 (#2425) <Ashwini Khade> - **[3ea3b0e0](onnx/onnx@3ea3b0e0)**: Add shape existence check in GatherElements shape inference logic (#2402) <Hariharan Seshadri> - **[192ad8c8](onnx/onnx@192ad8c8)**: add invite for next workshop (#2407) <Prasanth Pulavarthi> - **[eea60812](onnx/onnx@eea60812)**: Fix missing comma in exception message. Causes invalid message depending on what's in memory prior to the constant char string. (#2403) <Scott McKay> - **[dd082c99](onnx/onnx@dd082c99)**: Add section headers for easier linking (#2400) <Prasanth Pulavarthi> - **[ca1d5b7e](onnx/onnx@ca1d5b7e)**: Add type check for node inputs (#2367) <RandySheriffH> - **[e5600091](onnx/onnx@e5600091)**: Update doc loop op (#2337) <G. Ramalingam> Test Plan: ci Reviewed By: hl475 Differential Revision: D18365923 fbshipit-source-id: 8ac138e3ff9d4fbc5fdf85d06785190334c346a1
samnordmann
pushed a commit
to samnordmann/pytorch
that referenced
this pull request
Mar 6, 2023
rraminen
pushed a commit
to rraminen/pytorch
that referenced
this pull request
Aug 7, 2025
Commit Messages: - Fixing Rocrand issue Co-authored-by: Prachi Gupta <pracgupt@amd.com> PRs: - ROCm/apex#267 Co-authored-by: sriram <sriram.kumar@silo.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses issues #2385 #2169.
For a 2D input I flatten it and automatically create a Variable-wrapped offsets tensor based on constant bag size.
I also added extra tests to test_nn.py to make sure that we get the same outputs/gradients. I modified the test example to have an even bag length so that we could reuse it for both cases.