[torch.jit.script] Support tensor indexing after an Ellipsis #34837
Labels
enhancement
Not as big of a feature, but technically not a bug. Should be easy to fix
oncall: jit
Add this issue/PR to JIT oncall triage queue
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
馃殌 Feature
Support Tensor indexing after an ellipsis: right now the following code:
fails with:
Motivation
For our application, we would like to manipulate the diagonal of a batch of matrices, which is most easily expressed by manipulating
inputs[..., range(N), range(N)]
. Unfortunately, Torch does not currently support this when usingtorch.jit.script
.Another use-case is to vectorize a batch of symmetric matrices: ideally, we could do something like:
cc @suo
The text was updated successfully, but these errors were encountered: