Skip to content

Patching EmeddingBag to accept 2D input#2429

Merged
soumith merged 3 commits intopytorch:masterfrom
ajfisch:embedding_bag_fix
Aug 23, 2017
Merged

Patching EmeddingBag to accept 2D input#2429
soumith merged 3 commits intopytorch:masterfrom
ajfisch:embedding_bag_fix

Conversation

@ajfisch
Copy link
Contributor

@ajfisch ajfisch commented Aug 15, 2017

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.

This comment was marked as off-topic.

This comment was marked as off-topic.

@soumith soumith closed this Aug 16, 2017
@soumith soumith reopened this Aug 16, 2017
@soumith
Copy link
Collaborator

soumith commented Aug 16, 2017

@pytorchbot add to whitelist

@soumith soumith merged commit 27bd3df into pytorch:master Aug 23, 2017
@soumith
Copy link
Collaborator

soumith commented Aug 23, 2017

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>
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.

4 participants