-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Match NumPy ellipsis semantics for Advanced Indexing (v0.2.0) #2588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
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
soumith
reviewed
Aug 31, 2017
bool ellipsisFound = false; | ||
Py_ssize_t lastSeqDim = -1; | ||
|
||
// Note that we can have ndim + 1 Tensors in the case where we have an ellipsis, |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
same for this PR, why is this PR against v0.2.0? Make it to be against master. |
Closing in favor of #2589. |
houseroad
added a commit
to houseroad/pytorch
that referenced
this pull request
Feb 26, 2020
…179174 Summary: Previous import was 04a29addfd5b912812addb8dea5f8763fbfaad01 Included changes: - **[602bd622](onnx/onnx@602bd622)**: Add section about external tensor data to IR.md (pytorch#2323) <Jonny Shipton> - **[165c3f3b](onnx/onnx@165c3f3b)**: Add integer support to Clip (pytorch#2532) <Jonny Shipton> - **[a5fabf87](onnx/onnx@a5fabf87)**: Add operators LessOrEqual and GreaterOrEqual (as functions) (pytorch#2606) <Jeremy Cochoy> - **[f1dcdafc](onnx/onnx@f1dcdafc)**: Fix input document of quantized operators (pytorch#2117) <Takeshi Watanabe> - **[43af9b69](onnx/onnx@43af9b69)**: Add reference impl for sequence ops (pytorch#2380) <Bowen Bao> - **[aa50aa12](onnx/onnx@aa50aa12)**: Print value case of TypeProto more friendly (pytorch#2422) <Takeshi Watanabe> - **[2e67bfc3](onnx/onnx@2e67bfc3)**: Fix issue pytorch#2436 (pytorch#2447) <daquexian> - **[d27ffc6b](onnx/onnx@d27ffc6b)**: Add support for integer tensors to Min and Max (pytorch#2608) <Jonny Shipton> - **[5cc668af](onnx/onnx@5cc668af)**: Update IR.md to describe training extension. (pytorch#2615) <G. Ramalingam> - **[8c5bf9d4](onnx/onnx@8c5bf9d4)**: Generate node backend tests for celu operator (pytorch#2607) <Jonny Shipton> - **[7b65287e](onnx/onnx@7b65287e)**: Change dtype of dd_da in gradient test to float32 (pytorch#2620) <Shinichiro Hamaji> - **[e91739f2](onnx/onnx@e91739f2)**: Introduce SoftmaxCrossentropy as a loss function (pytorch#2573) <Ksenija Stanojevic> - **[b008ed3a](onnx/onnx@b008ed3a)**: Support gathernd with batch_dim mode (pytorch#2585) <wezuo> - **[d2fe4f22](onnx/onnx@d2fe4f22)**: Introduce MeanSquaredError as Loss Function (pytorch#2570) <Ksenija Stanojevic> - **[10b812a6](onnx/onnx@10b812a6)**: Add support for default attributes within FunctionExpandHelper (pytorch#2588) <Ewa Tusień> - **[3368834c](onnx/onnx@3368834c)**: adding version update content. (pytorch#2609) <Ke Zhang> - **[8873cb02](onnx/onnx@8873cb02)**: Adding Inverse Op (pytorch#2578) <Negin Raoof> - **[807c62cf](onnx/onnx@807c62cf)**: Training Proposal: Spec Changes and Gradient Operator (pytorch#2314) <Wei-Sheng Chin> - **[9fdae4c6](onnx/onnx@9fdae4c6)**: Copy sizes in some optimizers to remain shape information (pytorch#2574) <daquexian> - **[c978d102](onnx/onnx@c978d102)**: Implement CELU node as a Function (pytorch#2575) <Jeremy Cochoy> - **[c677aef4](onnx/onnx@c677aef4)**: Fix CI build break (pytorch#2603) <Changming Sun> - **[d343755d](onnx/onnx@d343755d)**: Allow function body to rely on other operator sets (pytorch#2597) <Ke Zhang> Test Plan: ci Differential Revision: D20124936 fbshipit-source-id: 5cd5a6a155a5ab59f7bb86337fca314b2dcb8364
houseroad
added a commit
to houseroad/pytorch
that referenced
this pull request
May 9, 2020
…40c18b (pytorch#38106) Summary: Pull Request resolved: pytorch#38106 Previous import was 807c62cf7e4c96ce49040bcf073b7e4a054f28a5 Included changes: - **[79a7e0df](onnx/onnx@79a7e0df)**: Fix copy paste error of Min op test case (pytorch#2640) <Takeshi Watanabe> - **[4cd2538d](onnx/onnx@4cd2538d)**: Add a release pipeline for Windows python packages (pytorch#2632) <Changming Sun> - **[e8b33a5a](onnx/onnx@e8b33a5a)**: Adding UnfoldToDepth op [1.7 Release] (pytorch#2616) <Negin Raoof> - **[c2a8d525](onnx/onnx@c2a8d525)**: update docs (pytorch#2627) <Ksenija Stanojevic> - **[22752354](onnx/onnx@22752354)**: Generate tests for MeanSquareDistance and SoftmaxCrossEntropyLoss (pytorch#2623) <Jonny Shipton> - **[602bd622](onnx/onnx@602bd622)**: Add section about external tensor data to IR.md (pytorch#2323) <Jonny Shipton> - **[165c3f3b](onnx/onnx@165c3f3b)**: Add integer support to Clip (pytorch#2532) <Jonny Shipton> - **[a5fabf87](onnx/onnx@a5fabf87)**: Add operators LessOrEqual and GreaterOrEqual (as functions) (pytorch#2606) <Jeremy Cochoy> - **[f1dcdafc](onnx/onnx@f1dcdafc)**: Fix input document of quantized operators (pytorch#2117) <Takeshi Watanabe> - **[43af9b69](onnx/onnx@43af9b69)**: Add reference impl for sequence ops (pytorch#2380) <Bowen Bao> - **[aa50aa12](onnx/onnx@aa50aa12)**: Print value case of TypeProto more friendly (pytorch#2422) <Takeshi Watanabe> - **[2e67bfc3](onnx/onnx@2e67bfc3)**: Fix issue pytorch#2436 (pytorch#2447) <daquexian> - **[d27ffc6b](onnx/onnx@d27ffc6b)**: Add support for integer tensors to Min and Max (pytorch#2608) <Jonny Shipton> - **[5cc668af](onnx/onnx@5cc668af)**: Update IR.md to describe training extension. (pytorch#2615) <G. Ramalingam> - **[8c5bf9d4](onnx/onnx@8c5bf9d4)**: Generate node backend tests for celu operator (pytorch#2607) <Jonny Shipton> - **[7b65287e](onnx/onnx@7b65287e)**: Change dtype of dd_da in gradient test to float32 (pytorch#2620) <Shinichiro Hamaji> - **[e91739f2](onnx/onnx@e91739f2)**: Introduce SoftmaxCrossentropy as a loss function (pytorch#2573) <Ksenija Stanojevic> - **[b008ed3a](onnx/onnx@b008ed3a)**: Support gathernd with batch_dim mode (pytorch#2585) <wezuo> - **[d2fe4f22](onnx/onnx@d2fe4f22)**: Introduce MeanSquaredError as Loss Function (pytorch#2570) <Ksenija Stanojevic> - **[10b812a6](onnx/onnx@10b812a6)**: Add support for default attributes within FunctionExpandHelper (pytorch#2588) <Ewa Tusień> - **[3368834c](onnx/onnx@3368834c)**: adding version update content. (pytorch#2609) <Ke Zhang> - **[8873cb02](onnx/onnx@8873cb02)**: Adding Inverse Op (pytorch#2578) <Negin Raoof> Test Plan: ci Reviewed By: hl475 Differential Revision: D21471424 fbshipit-source-id: 1c9f4291bb1816cc6741ae84d4260d81a1d525bf
facebook-github-bot
pushed a commit
that referenced
this pull request
May 9, 2020
…40c18b (#38106) Summary: Pull Request resolved: #38106 Previous import was 807c62cf7e4c96ce49040bcf073b7e4a054f28a5 Included changes: - **[79a7e0df](onnx/onnx@79a7e0df)**: Fix copy paste error of Min op test case (#2640) <Takeshi Watanabe> - **[4cd2538d](onnx/onnx@4cd2538d)**: Add a release pipeline for Windows python packages (#2632) <Changming Sun> - **[e8b33a5a](onnx/onnx@e8b33a5a)**: Adding UnfoldToDepth op [1.7 Release] (#2616) <Negin Raoof> - **[c2a8d525](onnx/onnx@c2a8d525)**: update docs (#2627) <Ksenija Stanojevic> - **[22752354](onnx/onnx@22752354)**: Generate tests for MeanSquareDistance and SoftmaxCrossEntropyLoss (#2623) <Jonny Shipton> - **[602bd622](onnx/onnx@602bd622)**: Add section about external tensor data to IR.md (#2323) <Jonny Shipton> - **[165c3f3b](onnx/onnx@165c3f3b)**: Add integer support to Clip (#2532) <Jonny Shipton> - **[a5fabf87](onnx/onnx@a5fabf87)**: Add operators LessOrEqual and GreaterOrEqual (as functions) (#2606) <Jeremy Cochoy> - **[f1dcdafc](onnx/onnx@f1dcdafc)**: Fix input document of quantized operators (#2117) <Takeshi Watanabe> - **[43af9b69](onnx/onnx@43af9b69)**: Add reference impl for sequence ops (#2380) <Bowen Bao> - **[aa50aa12](onnx/onnx@aa50aa12)**: Print value case of TypeProto more friendly (#2422) <Takeshi Watanabe> - **[2e67bfc3](onnx/onnx@2e67bfc3)**: Fix issue #2436 (#2447) <daquexian> - **[d27ffc6b](onnx/onnx@d27ffc6b)**: Add support for integer tensors to Min and Max (#2608) <Jonny Shipton> - **[5cc668af](onnx/onnx@5cc668af)**: Update IR.md to describe training extension. (#2615) <G. Ramalingam> - **[8c5bf9d4](onnx/onnx@8c5bf9d4)**: Generate node backend tests for celu operator (#2607) <Jonny Shipton> - **[7b65287e](onnx/onnx@7b65287e)**: Change dtype of dd_da in gradient test to float32 (#2620) <Shinichiro Hamaji> - **[e91739f2](onnx/onnx@e91739f2)**: Introduce SoftmaxCrossentropy as a loss function (#2573) <Ksenija Stanojevic> - **[b008ed3a](onnx/onnx@b008ed3a)**: Support gathernd with batch_dim mode (#2585) <wezuo> - **[d2fe4f22](onnx/onnx@d2fe4f22)**: Introduce MeanSquaredError as Loss Function (#2570) <Ksenija Stanojevic> - **[10b812a6](onnx/onnx@10b812a6)**: Add support for default attributes within FunctionExpandHelper (#2588) <Ewa Tusień> - **[3368834c](onnx/onnx@3368834c)**: adding version update content. (#2609) <Ke Zhang> - **[8873cb02](onnx/onnx@8873cb02)**: Adding Inverse Op (#2578) <Negin Raoof> Test Plan: ci Reviewed By: hl475 Differential Revision: D21471424 fbshipit-source-id: 5009a5f9558458a0aba56b2a9e8fffc3895a9e02
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 #2404.
NumPy allows you to specify
ndim + 1
indexers if one of them is an Ellipsis, which is basically tossed away. This PR extends such logic to PyTorch advanced indexing.