8000 Transpose using negative dimension · Issue #657 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
Transpose using negative dimension #657
@edouardoyallon

Description

@edouardoyallon

Hi!

It is not a major fix, however I think that x.transpose(-1,-3) should be valid, as it is in numpy:

x=np.zeros((3,5,7)
5DB7
)
x.transpose(-1,0,-2).shape

(7,3,5)

x=torch.FloatTensor(3,5,7)
x.transpose(-1,-2)

Traceback (most recent call last):
File "", line 1, in
RuntimeError: out of range at /data/users/soumith/miniconda2/conda-bld/pytorch-
cuda80-0.1.7_1485449073235/work/torch/lib/TH/generic/THTensor.c:398

Best,
EO

Metadata

Metadata

Assignees

No one assigned

    Labels

    todoNot as important as medium or high priority tasks, but we will work on these.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0